OpenToonz - An open-source full-featured 2D animation creation software
C
Ensure dialog set to NonModal in hideEvent
Abel You138f00eafa5c
diff --git a/toonz/sources/toonz/exportalllevelspopup.cpp b/toonz/sources/toonz/exportalllevelspopup.cppindex fd1a96838..888edbadb 100644--- a/toonz/sources/toonz/exportalllevelspopup.cpp+++ b/toonz/sources/toonz/exportalllevelspopup.cpp@@ -120,7 +120,6 @@ public://********************************************************************************ExportAllLevelsPopup::ExportAllLevelsPopup(){- setWindowModality(Qt::ApplicationModal);setWindowTitle(QString("Exporting All Levels..."));m_browser->setFolder(TApp::instance()->getCurrentScene()->getScene()->getProject()->getProjectFolder());@@ -146,7 +145,7 @@ ExportAllLevelsPopup::ExportAllLevelsPopup(){->layout()->itemAt(2)->widget()- ->layout(); // Add below checkbox No Antialias+ ->layout();fileFormatLayout->addWidget(m_exportall);fileFormatLayout->addWidget(m_skipButton);@@ -160,11 +159,14 @@ ExportAllLevelsPopup::ExportAllLevelsPopup(){initFolder();}-ExportAllLevelsPopup::~ExportAllLevelsPopup() { outputLevels.clear(); }+ExportAllLevelsPopup::~ExportAllLevelsPopup() {+ QWidget().setLayout(layout());+ }//------------------------------------void ExportAllLevelsPopup::showEvent(QShowEvent *se) {+ setWindowModality(Qt::ApplicationModal);if (Preferences::instance()->getPixelsOnly()) {m_exportOptions->m_widthFld->hide();@@ -197,6 +199,16 @@ void ExportAllLevelsPopup::showEvent(QShowEvent *se) {QDialog::showEvent(se);}+void ExportAllLevelsPopup::hideEvent(QHideEvent* he) {+ setWindowModality(Qt::NonModal);+ QDialog::hideEvent(he);++ outputLevels.clear();+ level_to_foldername.clear();++ m_swatch->image() = TImageP();+}+bool ExportAllLevelsPopup::execute() {// Get FolderTFilePath FolderPath = TFilePath(m_browser->getFolder());@@ -455,7 +467,7 @@ void ExportAllLevelsPopup::skip() {outputLevels.pop_back();// Is The Export All Action Done?if (isAllLevelsExported()) {- close();+ hide();} else {updateOnSelection();}diff --git a/toonz/sources/toonz/exportalllevelspopup.h b/toonz/sources/toonz/exportalllevelspopup.hindex 2cb76a44c..653739d89 100644--- a/toonz/sources/toonz/exportalllevelspopup.h+++ b/toonz/sources/toonz/exportalllevelspopup.h@@ -28,6 +28,7 @@ private:private slots:void GetSelectedSimpLevels() override;void showEvent(QShowEvent *se) override;+ void hideEvent(QHideEvent *he) override;void updateOnSelection() override;void onExportAll(bool toggled);void skip();