You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[needs-docs] Upgrade project level setting for Label as Outlines/text setting to use newer API
And replace labeling engine dialog "Draw text as outlines" checkbox with a combobox
presenting the choice of always rendering as outlines OR text.
(This will allow us to easily add additional methods in future, e.g. potentially
a "Render as text wherever possible" setting, for defaulting to text objects
whenever it doesn't impact the rendering quality to do so)
Copy file name to clipboardexpand all lines: src/core/qgsmapsettings.h
+22-3
Original file line number
Diff line number
Diff line change
@@ -267,12 +267,18 @@ class CORE_EXPORT QgsMapSettings
267
267
/**
268
268
* Sets the text render \a format, which dictates how text is rendered (e.g. as paths or real text objects).
269
269
*
270
+
* \warning Calling the setLabelingEngineSettings() method will reset the text render format to match the default
271
+
* text render format from the label engine settings.
272
+
*
270
273
* \see textRenderFormat()
271
274
* \since QGIS 3.4.3
272
275
*/
273
276
voidsetTextRenderFormat( QgsRenderContext::TextRenderFormat format )
274
277
{
275
278
mTextRenderFormat = format;
279
+
// ensure labeling engine setting is also kept in sync, just in case anyone accesses QgsMapSettings::labelingEngineSettings().defaultTextRenderFormat()
280
+
// instead of correctly calling QgsMapSettings::textRenderFormat(). It can't hurt to be consistent!
281
+
mLabelingEngineSettings.setDefaultTextRenderFormat( format );
276
282
}
277
283
278
284
//! sets format of internal QImage
@@ -433,13 +439,26 @@ class CORE_EXPORT QgsMapSettings
0 commit comments