[Qgis-developer] Deprecated labels tab 'removal' pull request

Larry Shaffer larrys at dakotacarto.com
Sun Sep 1 10:05:54 PDT 2013


Hi,

This has now been committed [0], but now uses a more flexible workflow (API
unchanged):

* Remove deprecated labeling properties tab for new projects or older ones
that don't use them

* Deprecated tab remains active for older projects, if any layer uses them

* Deprecated tab can be disabled/enabled via console commands for project
entry, e.g.:
  QgsProject.instance().writeEntry('DeprecatedLabels', '/Enabled', bool)
  or
  QgsProject.instance().removeEntry('DeprecatedLabels', '/')


[0] https://github.com/qgis/Quantum-GIS/commit/cae08e42

Regards,

Larry


On Sat, Aug 31, 2013 at 9:31 PM, Larry Shaffer <larrys at dakotacarto.com>wrote:

> Hi,
>
> I have a pull request to remove deprecated labels properties tab from
> vector layer properties, if not used by an older project [0]. I've tested
> it, but did not commit it because it included a public function for QgisApp
> (though no Python binding). If anyone who can pass judgement upon it thinks
> it is OK, please merge it, or let me know if I can.
>
> This is the handling of the deprecated labels tab I figured was best:
>
> * Deprecated labels tab remains active for all layers in an older project,
> if any layer uses them, for the duration of project's open session
> (including when saving project instance with no layers that use deprecated
> labels).
>
> * Caveat (feature?):  If all layers no longer use deprecated labels on
> project close, when project is reopened, deprecated labels tab will no
> longer be available. Some users may not like this, but they are being
> warned about opening an older project version.
>
> * New projects, or opened older projects that do not use deprecated
> labels, will never show the deprecated labels tab. With those projects,
> there is no way to enable the deprecated labeling tab.
>
> Please let me know if I am off-the-mark with this workflow.
>
> My logic is that if someone is still using deprecated labels in a project,
> that type of labeling should remain available to all layers in the project.
> I created an earlier branch where the deprecated labels tab was only turned
> on for the layers that use deprecated labels [1]. However, this was fairly
> limiting (see commit message) and would probably annoy users.
>
>
> [0] https://github.com/qgis/Quantum-GIS/pull/851
> [1] https://github.com/dakcarto/Quantum-GIS/commit/7eb4866f
>
> Regards,
>
> Larry
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20130901/452e8b2b/attachment.html>


More information about the Qgis-developer mailing list