diff --git a/src/windows/views/files_treeview.py b/src/windows/views/files_treeview.py index 91a6e29c2..96fb19097 100644 --- a/src/windows/views/files_treeview.py +++ b/src/windows/views/files_treeview.py @@ -93,14 +93,18 @@ def contextMenuEvent(self, event): menu.popup(event.globalPos()) def mouseDoubleClickEvent(self, event): - super(FilesTreeView, self).mouseDoubleClickEvent(event) - # Preview File, File Properties, or Split File (depending on Shift/Ctrl) - if int(get_app().keyboardModifiers() & Qt.ShiftModifier) > 0: - get_app().window.actionSplitFile.trigger() - elif int(get_app().keyboardModifiers() & Qt.ControlModifier) > 0: - get_app().window.actionFile_Properties.trigger() + # Get the index of the item at the click position + index = self.indexAt(event.pos()) + if index.column() == 0: + # If column 0 (thumbnail) is double-clicked, trigger the custom actions + if int(get_app().keyboardModifiers() & Qt.ShiftModifier) > 0: + get_app().window.actionSplitFile.trigger() + elif int(get_app().keyboardModifiers() & Qt.ControlModifier) > 0: + get_app().window.actionFile_Properties.trigger() + else: + get_app().window.actionPreview_File.trigger() else: - get_app().window.actionPreview_File.trigger() + super(FilesTreeView, self).mouseDoubleClickEvent(event) def dragEnterEvent(self, event): # If dragging urls onto widget, accept