From 5e297b9115bddb23b3e2ef40f6196fa9c22407ff Mon Sep 17 00:00:00 2001 From: Rodney Date: Dec 21 2019 14:49:29 +0000 Subject: Merge pull request #2947 from martinvanzijl/allow-double-click-in-load-level-dialog Allow double-click in Load Level dialog to open selected level(s) --- diff --git a/toonz/sources/toonz/filebrowserpopup.cpp b/toonz/sources/toonz/filebrowserpopup.cpp index 375f96b..52cad83 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 44dac37..cc25054 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);