Skip to content

Commit

Permalink
Remove ugly processEvents call which causes issues when loading projects
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Mar 31, 2023
1 parent 75b07d4 commit e2aad87
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/gui/qgsdockablewidgethelper.cpp
Expand Up @@ -411,8 +411,10 @@ void QgsDockableWidgetHelper::setupDockWidget( const QStringList &tabSiblings )
{
mOwnerWindow->addDockWidget( mDockArea, mDock );
}
QgsApplication::processEvents(); // required to resize properly!
mDock->setGeometry( mDockGeometry );

// can only resize properly and set the dock geometry after pending events have been processed,
// so queue the geometry setting on the end of the event loop
QMetaObject::invokeMethod( mDock, [this] { mDock->setGeometry( mDockGeometry ); }, Qt::QueuedConnection );
}

QToolButton *QgsDockableWidgetHelper::createDockUndockToolButton()
Expand Down

0 comments on commit e2aad87

Please sign in to comment.