tlh22 / TOMs

Traffic Order Management System
GNU General Public License v3.0
4 stars 3 forks source link

Problems displaying label leaders #404

Open tlh22 opened 2 years ago

tlh22 commented 2 years ago

Have been trying to use a trigger to deal with label leaders. Eventually realised that the dependencies on other layers was to complicated in current form to be reliable. Decided then to revert to filtering within QGIS.

Initial ideas was to use a rule within the symbology for the layer - for labels it is "DisplayLabel" = 'true' AND getBayLabelText() IS NOT NULL. This worked as expected, however, when combined with the same type of filters for other layers, QGIS hung (on Windows at least). (The same behaviour did not occur on Linux).

Attempted to isolate issue and tried to switch on/off different layers. The problem continued irrespective of which combination was used. The last print was made from within the getLookupLabelText function. Interestingly, it was possible to switch layers on and off without the system hanging. The issue occur when a redraw was initiated - either with pan or with a scale change.

tlh22 commented 2 years ago

In the end, decided to move filter logic into a geometry generator. This seems to have solved the issue.