Fix crash when use Windows/Close option.
--HG-- branch : develop
This commit is contained in:
parent
fdd7f6c2a3
commit
231780d35e
|
@ -2884,6 +2884,7 @@ void MainWindow::Clear()
|
||||||
qCDebug(vMainWindow, "Unlocked pattern file.");
|
qCDebug(vMainWindow, "Unlocked pattern file.");
|
||||||
ActionDraw(true);
|
ActionDraw(true);
|
||||||
qCDebug(vMainWindow, "Returned to Draw mode.");
|
qCDebug(vMainWindow, "Returned to Draw mode.");
|
||||||
|
setCurrentFile(QString());// Keep before cleaning a pattern data to prevent a crash
|
||||||
pattern->Clear();
|
pattern->Clear();
|
||||||
qCDebug(vMainWindow, "Clearing pattern.");
|
qCDebug(vMainWindow, "Clearing pattern.");
|
||||||
if (not qApp->GetPPath().isEmpty() && not doc->MPath().isEmpty())
|
if (not qApp->GetPPath().isEmpty() && not doc->MPath().isEmpty())
|
||||||
|
@ -2891,7 +2892,6 @@ void MainWindow::Clear()
|
||||||
watcher->removePath(AbsoluteMPath(qApp->GetPPath(), doc->MPath()));
|
watcher->removePath(AbsoluteMPath(qApp->GetPPath(), doc->MPath()));
|
||||||
}
|
}
|
||||||
doc->clear();
|
doc->clear();
|
||||||
setCurrentFile(QString());
|
|
||||||
qCDebug(vMainWindow, "Clearing scenes.");
|
qCDebug(vMainWindow, "Clearing scenes.");
|
||||||
sceneDraw->clear();
|
sceneDraw->clear();
|
||||||
sceneDetails->clear();
|
sceneDetails->clear();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user