From e19527c369e0e5f0e6eafbea401e440c1cebed57 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Tue, 12 Mar 2019 08:54:00 +0100 Subject: [PATCH] Fix geometry generator type visibility glitch --- src/app/qgslabelinggui.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/app/qgslabelinggui.cpp b/src/app/qgslabelinggui.cpp index 12e885a4f7f4..4d3ec27ddc03 100644 --- a/src/app/qgslabelinggui.cpp +++ b/src/app/qgslabelinggui.cpp @@ -757,7 +757,15 @@ void QgsLabelingGui::validateGeometryGeneratorExpression() } } - mGeometryGeneratorWarningLabel->setVisible( !valid ); + // The collapsible groupbox internally changes the visibility of this + // Work around by setting the visibility deferred in the next event loop cycle. + QTimer *timer = new QTimer(); + connect( timer, &QTimer::timeout, this, [this, valid]() + { + mGeometryGeneratorWarningLabel->setVisible( !valid ); + } ); + connect( timer, &QTimer::timeout, timer, &QTimer::deleteLater ); + timer->start( 0 ); } void QgsLabelingGui::determineGeometryGeneratorType()