Hi,<br><br>Thanks Alexander for developping the idea underneath my patch. Allowing the user to define the default Qgis scale lists is the right way to go. And we will be able to have a "scale list repository", as python snippets codes.<br>
<br>I have another related idea. It could be good to have a project option to force the canvas to always stick to the given scales list. Anytime the user zoom (in / out / to extent , etc.), Qgis will go the closer corresponding scale. For example, if a zoom should bring me to 1/2656, and I have defined this scales list : 1000, 2500, 5000, 10000, Qgis will automatically zoom 1/2500 instead.<br>
Of course we should not refresh the canvas twice, one for 2656 and then one for 2500.<br><br>Michael<br><br><br><div class="gmail_quote">2012/7/16 Marco Hugentobler <span dir="ltr"><<a href="mailto:marco.hugentobler@sourcepole.ch" target="_blank">marco.hugentobler@sourcepole.ch</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Alexander<br>
<br>
Ok, that sounds reasonable to me (new class in core directory). In that case, the new class has a similar role for scales as QgsTolerance has for snap distances.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
P.S. we can move this discussion do the developers list if necessary.<br>
</blockquote>
<br>
done.<br>
<br>
Thanks,<br>
Marco<br>
<br>
<br>
<br>
Am 16.07.2012 10:28, schrieb Alexander Bruy:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Marco.<br>
<br>
2012/7/16 Marco Hugentobler <<a href="mailto:marco.hugentobler@sourcepole.ch" target="_blank">marco.hugentobler@sourcepole.<u></u>ch</a>>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm working on feature #5561 "Project scale list" [0] and already<br>
implement almost all desired functionality.<br>
</blockquote>
Is the implementation similar to the patch which currently is attached to<br>
the ticket?<br>
</blockquote>
It uses same idea but with a little different implementation. First I implement<br>
ability to change global scale list from QGIS settings so user can enter<br>
preferred scales and always use them in all project. The second step is a<br>
project level scale list, which can override global settings.<br>
<br>
I just push this branch to my fork on GitHub here:<br>
<a href="https://github.com/alexbruy/Quantum-GIS/tree/project_scale" target="_blank">https://github.com/alexbruy/<u></u>Quantum-GIS/tree/project_scale</a><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Is it ok to create such class and where is better to place it? I think,<br>
it should go to core subdirectory<br>
</blockquote>
Could you explain the functionality of the scale manager class? If it is<br>
just QgsProject::instance()-><u></u>readListEntry() / writeEntry(), it might be<br>
overkill to create a new class (but I guess there is more, I just did not<br>
follow the ticket too closely).<br>
</blockquote>
I already use QgsProject::instance()-><u></u>readListEntry() / writeEntry() to read<br>
and write scale list defined per-project. But I also want to provide for users<br>
easy method to save scale list, move it to another PC (like connection<br>
settings or shortcuts) and then load this list as global or project.<br>
<br>
So this class will create separate XML (or even plain text) file from<br>
global/project<br>
scale list or populate global/project scale list from existing file.<br>
<br>
P.S. we can move this discussion do the developers list if necessary.<br>
<br>
Thanks for your time<span class="HOEnZb"><font color="#888888"><br>
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
<br>
-- <br>
Dr. Marco Hugentobler<br>
Sourcepole -  Linux & Open Source Solutions<br>
Weberstrasse 5, CH-8004 Zürich, Switzerland<br>
<a href="mailto:marco.hugentobler@sourcepole.ch" target="_blank">marco.hugentobler@sourcepole.<u></u>ch</a> <a href="http://www.sourcepole.ch" target="_blank">http://www.sourcepole.ch</a><br>
Technical Advisor QGIS Project Steering Committee<br>
<br>
______________________________<u></u>_________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org" target="_blank">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/qgis-<u></u>developer</a><br>
</font></span></blockquote></div><br>