Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 08-01-2018, 20:33   #151
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 5,258
Re: OCPN Beta 4.8.1 PreAlpha

bcn...

Corrected ChartInfoWindow position logic. Please check.

Thanks
Dave
__________________

bdbcat is online now   Reply With Quote
Old 08-01-2018, 23:45   #152
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 2,230
Re: OCPN Beta 4.8.1 PreAlpha

Build error in VS 2013
PR #955 and #956

Code:
Error    30    error C2065: 'PLUGIN_CATALOG_NAME' : undeclared identifier    C:\Builds\OCPN\OpenCPN\plugins\wmm_pi\src\wmm_pi.cpp    127    1    wmm_pi
Error    31    error C2065: 'PLUGIN_CATALOG_NAME' : undeclared identifier    C:\Builds\OCPN\OpenCPN\plugins\chartdldr_pi\src\chartdldr_pi.cpp    160    1    chartdldr_pi
Setting back to previous is a temporary fix:
Code:
int wmm_pi::Init(void)
{
    //AddLocaleCatalog( PLUGIN_CATALOG_NAME );
    AddLocaleCatalog(_T("opencpn-wmm_pi"));
Håkan
__________________

Hakan is offline   Reply With Quote
Old 09-01-2018, 00:06   #153
Registered User

Join Date: Jun 2015
Posts: 296
Re: OCPN Beta 4.8.1 PreAlpha

Quote:
Originally Posted by Hakan View Post
Build error in VS 2013
PR #955 and #956

Code:
Error    30    error C2065: 'PLUGIN_CATALOG_NAME' : undeclared identifier    C:\Builds\OCPN\OpenCPN\plugins\wmm_pi\src\wmm_pi.cpp    127    1    wmm_pi
Error    31    error C2065: 'PLUGIN_CATALOG_NAME' : undeclared identifier    C:\Builds\OCPN\OpenCPN\plugins\chartdldr_pi\src\chartdldr_pi.cpp    160    1    chartdldr_pi
Setting back to previous is a temporary fix:
Code:
int wmm_pi::Init(void)
{
    //AddLocaleCatalog( PLUGIN_CATALOG_NAME );
    AddLocaleCatalog(_T("opencpn-wmm_pi"));
Håkan

You have to remove wmm_pi/src/version.h same for chartdlr_pi

After CMakeList changes best is to delete build tree and look at git status in source tree looking for 'Untracked files:'.
did-g is offline   Reply With Quote
Old 09-01-2018, 00:28   #154
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 2,230
Re: OCPN Beta 4.8.1 PreAlpha

Jon...
Thanks, my fault!
A clean /build and rerun of cmake was done before but I wasn't aware of that "git merge" did not deleted the files in my working branch but told me to do so. I fixed some conflicts but was probably lazy and didn't read all notes before commit. - Sorry
Håkan
Hakan is offline   Reply With Quote
Old 09-01-2018, 00:56   #155
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 2,230
Re: OCPN Beta 4.8.1 PreAlpha

Quote:
Originally Posted by bdbcat View Post
bcn...
Corrected ChartInfoWindow position logic. Please check.
Thanks
Dave
Although not Hubert; For info are my pop-ups fine as before but ther's still no ChartInfoWindow pop-up when only one single CM93 bar is present, intentionally or not.
Håkan
Hakan is offline   Reply With Quote
Old 09-01-2018, 01:20   #156
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 3,089
Re: OCPN Beta 4.8.1 PreAlpha

Chart information for me ok now. Raster and S-57. With one single chart as well.

Hubert
Attached Thumbnails
Click image for larger version

Name:	2018-01-09 10_17_59-OpenCPN 4.8.10101 -- [Portable(-p) executing from C__Users_XPS_Desktop_OCPNb.png
Views:	31
Size:	109.1 KB
ID:	161832  
bcn is offline   Reply With Quote
Old 09-01-2018, 02:15   #157
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 2,230
Re: OCPN Beta 4.8.1 PreAlpha

Dave..
I'm trying to debug why the chartinfo pop-up isn't shown when I've one single CM93 bar.
The ChInfoWin::SetBitmap() does run fine when there are two or more bars but not when only one single CM93.
When I make the change below the chartinfo is there also when only one single CM93 bar is present. But I'm not sure if my change may have other implications. (Hubert says it's working for him??) Pls have a look.
Håkan
Code:
@@ -7676,7 +7676,7 @@ void MyFrame::HandlePianoRollover( int selected_index, int selected_dbIndex )
     } else {
         ArrayOfInts piano_chart_index_array = cc1->GetQuiltExtendedStackdbIndexArray();
 
-        if( ( pCurrentStack->nEntry > 1 ) || ( piano_chart_index_array.GetCount() > 1 ) ) {
+        if( ( pCurrentStack->nEntry > 1 ) || ( piano_chart_index_array.GetCount() >= 1 ) ) {
             cc1->ShowChartInfoWindow( key_location.x, selected_dbIndex );
Hakan is offline   Reply With Quote
Old 09-01-2018, 05:40   #158
Registered User

Join Date: Jul 2010
Location: Kalamata, Greece
Boat: Amel Sharki
Posts: 1,856
Re: OCPN Beta 4.8.1 PreAlpha

Quote:
Originally Posted by Hakan View Post
Dave..
I'm trying to debug why the chartinfo pop-up isn't shown when I've one single CM93 bar.
The ChInfoWin::SetBitmap() does run fine when there are two or more bars but not when only one single CM93.
When I make the change below the chartinfo is there also when only one single CM93 bar is present. But I'm not sure if my change may have other implications. (Hubert says it's working for him??) Pls have a look.
Håkan
Code:
@@ -7676,7 +7676,7 @@ void MyFrame::HandlePianoRollover( int selected_index, int selected_dbIndex )
     } else {
         ArrayOfInts piano_chart_index_array = cc1->GetQuiltExtendedStackdbIndexArray();
 
-        if( ( pCurrentStack->nEntry > 1 ) || ( piano_chart_index_array.GetCount() > 1 ) ) {
+        if( ( pCurrentStack->nEntry > 1 ) || ( piano_chart_index_array.GetCount() >= 1 ) ) {
             cc1->ShowChartInfoWindow( key_location.x, selected_dbIndex );
Yes, confirmed. Your patch is OK. No other side effects.
Huberts screenshot has not a single CM93 but an ES ENC chart in his chartinfo window.

Gerhard
CarCode is offline   Reply With Quote
Old 09-01-2018, 06:46   #159
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 5,258
Re: OCPN Beta 4.8.1 PreAlpha

Hakan...

re:
"ther's still no ChartInfoWindow pop-up when only one single CM93 bar is present, intentionally or not"

I think this was intentional, but I cannot recall the logic of the decision. Perhaps some ancient problem with ChartInfoWindow implementation, long since fixed.

Anyway, your patch looks OK, and I will incorporate it.

Thanks
Dave
bdbcat is online now   Reply With Quote
Old 09-01-2018, 07:02   #160
Registered User

Join Date: Jun 2015
Posts: 296
Re: OCPN Beta 4.8.1 PreAlpha

Dave
On linux now I have to use
adjust = 2;
in
ChInfoWin::FitToChars

Or the last line isn't fully displayed.
Attached Thumbnails
Click image for larger version

Name:	Capture du 2018-01-09 09:21:09.png
Views:	29
Size:	72.3 KB
ID:	161856  
did-g is offline   Reply With Quote
Old 09-01-2018, 07:33   #161
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 5,258
Re: OCPN Beta 4.8.1 PreAlpha

did-g...

Interesting.

What happens if you set the font in the constructor, like this:

Code:
ChInfoWin::ChInfoWin( wxWindow *parent )
{
    
    long style = wxSIMPLE_BORDER | wxCLIP_CHILDREN;
#ifdef __WXOSX__
    style |= wxSTAY_ON_TOP;
#endif

    wxDialog::Create( parent, wxID_ANY, _T(""), wxDefaultPosition, wxDefaultSize, style );

    wxFont *dFont = FontMgr::Get().GetFont( _("Dialog") );
    SetFont(*dFont);
    
    int ststyle = wxALIGN_LEFT | wxST_NO_AUTORESIZE;
    m_pInfoTextCtl = new wxStaticText( this, -1, _T ( "" ), wxDefaultPosition, wxDefaultSize,
                                       ststyle );

    dbIndex = -1;
    Hide();
}
Of course, you need to include:
#include "FontMgr.h"

Dave
bdbcat is online now   Reply With Quote
Old 09-01-2018, 09:01   #162
Registered User

Join Date: Jun 2015
Posts: 296
Re: OCPN Beta 4.8.1 PreAlpha

Quote:
Originally Posted by bdbcat View Post
did-g...

Interesting.

What happens if you set the font in the constructor, like this:

Code:
ChInfoWin::ChInfoWin( wxWindow *parent )
{
    
    long style = wxSIMPLE_BORDER | wxCLIP_CHILDREN;
#ifdef __WXOSX__
    style |= wxSTAY_ON_TOP;
#endif

    wxDialog::Create( parent, wxID_ANY, _T(""), wxDefaultPosition, wxDefaultSize, style );

    wxFont *dFont = FontMgr::Get().GetFont( _("Dialog") );
    SetFont(*dFont);
    
    int ststyle = wxALIGN_LEFT | wxST_NO_AUTORESIZE;
    m_pInfoTextCtl = new wxStaticText( this, -1, _T ( "" ), wxDefaultPosition, wxDefaultSize,
                                       ststyle );

    dbIndex = -1;
    Hide();
}
Of course, you need to include:
#include "FontMgr.h"

Dave
Nothing, same behavior.

But adding SetClientSize in ChInfoWin::SetBitmap seems to work, at least for me...
Code:
SetSize( top_position.x, top_position.y, m_size.x, m_size.y );
SetClientSize( m_size.x, m_size.y );
Could be a bug in xfce window manager for undecorated windows.
did-g is offline   Reply With Quote
Old 09-01-2018, 09:10   #163
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 5,258
Re: OCPN Beta 4.8.1 PreAlpha

did-g...

OK, probably you are right on the window manager bug.

Anyway, I have already started final Beta builds, so would you send a Pull Request for this fix so that it won't be lost?

Thanks
Dave
__________________

bdbcat is online now   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OCPN Beta Version 4.1 PlugIns bdbcat OpenCPN 5 28-09-2015 05:44
How to use MMR2-C-Map card reader with OCPN ? Flemming Torp OpenCPN 6 28-05-2012 08:39
Pictures of OCPN in action. cagney OpenCPN 0 03-04-2012 09:16
Furuno and OCPN KrisCatteceur Navigation 2 12-01-2012 13:04
Does OCPN support NMEA 0183 v3.1? Netsurfer OpenCPN 5 25-05-2010 07:42



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 18:41.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2018, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.