mirror of
https://github.com/KDE/latte-dock.git
synced 2024-12-26 23:21:37 +03:00
delay the recreation of a dock
--when recreating a dock it might be a good idea to delay a bit in order to give to the config window the time to delete itself
This commit is contained in:
parent
919af662e6
commit
5e1d851888
@ -926,13 +926,16 @@ void DockCorona::addDock(Plasma::Containment *containment, int expDockScreen)
|
||||
|
||||
void DockCorona::recreateDock(Plasma::Containment *containment)
|
||||
{
|
||||
auto view = m_dockViews.take(containment);
|
||||
//give the time to config window to close itself first and then recreate the dock
|
||||
QTimer::singleShot(350, [this, containment]() {
|
||||
auto view = m_dockViews.take(containment);
|
||||
|
||||
if (view) {
|
||||
view->setVisible(false);
|
||||
view->deleteLater();
|
||||
addDock(view->containment());
|
||||
}
|
||||
if (view) {
|
||||
view->setVisible(false);
|
||||
view->deleteLater();
|
||||
addDock(view->containment());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void DockCorona::destroyedChanged(bool destroyed)
|
||||
|
Loading…
Reference in New Issue
Block a user