Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 27-01-2014, 10:46   #1
Registered User

Join Date: Aug 2012
Location: San Jose, CA, USA
Posts: 65
Why does selecting a chart automatically zoom?

Hi,

currently whenever you select a new chart (from the chart banner below the main window), it automatically zooms to the new chart's best zoom level (which seems to be the maximal zoom level for the chart). This is really annoying esp. in heavily quilted regions like San Francisco Bay (made up from > 10 charts) because you always loose the current view.

The simple patch below disables this completely but before I create a pull request I want to understand the rationale for the current behavior. Does anyone has a use case where this automatic panning an zooming is helpful?

Code:
diff --git src/chart1.cpp src/chart1.cpp
index 279e4b6..4325430 100644
--- src/chart1.cpp
+++ src/chart1.cpp
@@ -5648,8 +5648,8 @@ void MyFrame::SelectQuiltRefdbChart( int db_index )
 
     ChartBase *pc = ChartData->OpenChartFromDB( db_index, FULL_INIT );
     if( pc ) {
-        double best_scale = GetBestVPScale( pc );
-        cc1->SetVPScale( best_scale );
+        // double best_scale = GetBestVPScale( pc );
+        // cc1->SetVPScale( best_scale );
     }
     else
         cc1->SetQuiltRefChart( -1 );
__________________

__________________
nkiesel is offline   Reply With Quote
Old 27-01-2014, 11:27   #2
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,016
Re: Why does selecting a chart automatically zoom?

If anything, wouldn't it be better to just make it honour the "Preserve scale while changing chart" setting instead of removing it completely?
I agree that it's annoying in SF bay in some cases, but in others I like it.

Pavel
__________________

__________________
nohal is offline   Reply With Quote
Old 27-01-2014, 13:09   #3
Registered User

Join Date: Aug 2012
Location: San Jose, CA, USA
Posts: 65
Re: Why does selecting a chart automatically zoom?

Thank you so much! When I checked the code I found that GetBestVPScale already honors this flag. So I reverted my patch, enabled the "Preserve Scale when Switching Charts" option and everything works.

So instead of further coding first back to the manual to find out which other options I don't know about yet.

Having said that: I still don't really see why switching zoom when selecting a chart is ever a good thing. You can always zoom in as needed after selecting, but the automatic zoom has the potential to completely change your current view. Could you explain a bit more in which situations you like this? Just trying to learn more about using OpenCPN here.
__________________
nkiesel is offline   Reply With Quote
Old 28-01-2014, 02:22   #4
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 1,967
Re: Why does selecting a chart automatically zoom?

nkiesel...
I use it in this way:
"Preserve scale while changing chart" is ON
This is my normal setting where I can view details on small charts from "above" and if I like I use a zoom function to fill the screen and then lose the overview if it's convenient for the moment.

"Preserve scale while changing chart" is OFF
When I sail in narrow waters and like to have one mouse click to details in front of me and only one click back to overview. I then use the "Chart Selection Bar".

So I do agree to Pavel's opinion. I use both options but do like to have the possibility to choose.

Just another tip for detailed/overview screen. I use a second portable instance of O for overview. See my screenshot. (A VDR play. Never been "over there". )
Attached Thumbnails
Click image for larger version

Name:	Screen Capture.jpg
Views:	81
Size:	414.5 KB
ID:	74827  
__________________
Hakan is offline   Reply With Quote
Old 28-01-2014, 02:48   #5
Registered User

Join Date: Aug 2012
Location: San Jose, CA, USA
Posts: 65
Re: Why does selecting a chart automatically zoom?

Thanks, very informative.

I mostly use OpenCPN for planning races in and around SF Bay while being at home (though I also used it during a delivery from Los Angeles to San Francisco). For this the "Preserve Scale wile switching" seems much better.
__________________
nkiesel is offline   Reply With Quote
Reply

Tags
cal

Thread Tools
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




Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 20:35.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.