KDAB / KDDockWidgets

KDAB's Dock Widget Framework for Qt
https://www.kdab.com/development-resources/qt-tools/kddockwidgets
Other
747 stars 163 forks source link

Don't destroy DockWidget if it's shown immediately after being closed #515

Open mpersano opened 2 weeks ago

mpersano commented 2 weeks ago

When a DockWidget is closed, Frame::scheduleDeleteLater gets called, which doesn't immediately delete the Frame. If the DockWidget is shown again before ~Frame has had a chance to run, the DockWidget will become a parent of the Frame again and will be destroyed when Frame gets deleted.

Fix this by doing the necessary housekeeping when the Frame is scheduled for deletion.