From 6c18a3b0b5d1fecb102eee68dbbeed441c4e6e99 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Sat, 6 Dec 2014 13:19:43 +0100 Subject: [PATCH] allow drags from report table --- apps/opencs/view/tools/reporttable.cpp | 6 ++++++ apps/opencs/view/tools/reporttable.hpp | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/apps/opencs/view/tools/reporttable.cpp b/apps/opencs/view/tools/reporttable.cpp index cc0ced57f..e4acc2629 100644 --- a/apps/opencs/view/tools/reporttable.cpp +++ b/apps/opencs/view/tools/reporttable.cpp @@ -7,6 +7,12 @@ #include "../../view/world/idtypedelegate.hpp" +void CSVTools::ReportTable::mouseMoveEvent (QMouseEvent *event) +{ + if (event->buttons() & Qt::LeftButton) + startDrag (*this); +} + CSVTools::ReportTable::ReportTable (CSMDoc::Document& document, const CSMWorld::UniversalId& id, QWidget *parent) : CSVWorld::DragRecordTable (document, parent), mModel (document.getReport (id)) diff --git a/apps/opencs/view/tools/reporttable.hpp b/apps/opencs/view/tools/reporttable.hpp index 18365f58e..acd1ed3cc 100644 --- a/apps/opencs/view/tools/reporttable.hpp +++ b/apps/opencs/view/tools/reporttable.hpp @@ -22,6 +22,10 @@ namespace CSVTools CSMTools::ReportModel *mModel; CSVWorld::CommandDelegate *mIdTypeDelegate; + private: + + void mouseMoveEvent (QMouseEvent *event); + public: ReportTable (CSMDoc::Document& document, const CSMWorld::UniversalId& id,