Fix geometry generator type visibility glitch

This commit is contained in:
Matthias Kuhn 2019-03-12 08:54:00 +01:00
parent 67555c8432
commit e19527c369
No known key found for this signature in database
GPG Key ID: 7A7F1A1C90C3E6A7

View File

@ -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()