Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

Allow double-click in Load Level dialog to open selected level(s).

Martin van Zijl7f2aa40d7be6
diff --git a/toonz/sources/toonz/filebrowserpopup.cpp b/toonz/sources/toonz/filebrowserpopup.cpp
index 375f96b98..52cad837a 100644
--- a/toonz/sources/toonz/filebrowserpopup.cpp
+++ b/toonz/sources/toonz/filebrowserpopup.cpp
@@ -860,6 +860,8 @@ LoadLevelPopup::LoadLevelPopup()
SLOT(onNameSetEditted()));
connect(m_browser, SIGNAL(treeFolderChanged(const TFilePath &)), this,
SLOT(onNameSetEditted()));
+ connect(m_browser, SIGNAL(filePathDoubleClicked(const TFilePath&)), this,
+ SLOT(onFilePathDoubleClicked(const TFilePath&)));
}
//-----------------------------------------------------------------------
@@ -1213,6 +1215,14 @@ void LoadLevelPopup::initFolder() {
setFolder(fp);
onFilePathsSelected(getCurrentPathSet(), getCurrentFIdsSet());
}
+
+//----------------------------------------------------------------------------
+
+void LoadLevelPopup::onFilePathDoubleClicked(const TFilePath& path) {
+ Q_UNUSED(path);
+ onOkPressed();
+}
+
//----------------------------------------------------------------------------
void LoadLevelPopup::onFilePathsSelected(
diff --git a/toonz/sources/toonz/filebrowserpopup.h b/toonz/sources/toonz/filebrowserpopup.h
index 44dac37c6..cc25054c0 100644
--- a/toonz/sources/toonz/filebrowserpopup.h
+++ b/toonz/sources/toonz/filebrowserpopup.h
@@ -303,6 +303,9 @@ public slots:
// the selection
void onSelectionChanged(TSelection *selection);
+protected slots:
+ void onFilePathDoubleClicked(const TFilePath &path);
+
private:
// update the fields acording to the current Path
void updateBottomGUI(void);