From 6ff41c6a0063d1a2ea149c63bb6725eeea95c158 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Thu, 23 Oct 2014 11:28:58 +0200 Subject: [PATCH] intercept shift/ctrl double-clicks in tables --- apps/opencs/view/world/table.cpp | 13 +++++++++++++ apps/opencs/view/world/table.hpp | 4 ++++ 2 files changed, 17 insertions(+) diff --git a/apps/opencs/view/world/table.cpp b/apps/opencs/view/world/table.cpp index 6adf3e0c1..168a06356 100644 --- a/apps/opencs/view/world/table.cpp +++ b/apps/opencs/view/world/table.cpp @@ -177,6 +177,19 @@ void CSVWorld::Table::contextMenuEvent (QContextMenuEvent *event) menu.exec (event->globalPos()); } +void CSVWorld::Table::mouseDoubleClickEvent (QMouseEvent *event) +{ + Qt::KeyboardModifiers modifiers = + event->modifiers() & (Qt::ShiftModifier | Qt::ControlModifier); + + if (!modifiers) + DragRecordTable::mouseDoubleClickEvent (event); + else + { + + } +} + CSVWorld::Table::Table (const CSMWorld::UniversalId& id, bool createAndDelete, bool sorting, CSMDoc::Document& document) : mCreateAction (0), mCloneAction(0), mRecordStatusDisplay (0), diff --git a/apps/opencs/view/world/table.hpp b/apps/opencs/view/world/table.hpp index a80a0b362..9bd561bda 100644 --- a/apps/opencs/view/world/table.hpp +++ b/apps/opencs/view/world/table.hpp @@ -64,6 +64,10 @@ namespace CSVWorld void dropEvent(QDropEvent *event); + protected: + + virtual void mouseDoubleClickEvent (QMouseEvent *event); + public: Table (const CSMWorld::UniversalId& id, bool createAndDelete,