r17668 by jghali - #8245: middle mouse panning not working in node edit
scribus-commit
scribus-commit at lists.scribus.net
Mon Jul 2 22:28:51 UTC 2012
Author: jghali
Date: Mon Jul 2 22:28:50 2012
New Revision: 17668
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17668
Log:
#8245: middle mouse panning not working in node edit
Modified:
trunk/Scribus/scribus/canvasmode_nodeedit.cpp
Modified: trunk/Scribus/scribus/canvasmode_nodeedit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17668&path=/trunk/Scribus/scribus/canvasmode_nodeedit.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_nodeedit.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_nodeedit.cpp Mon Jul 2 22:28:50 2012
@@ -20,6 +20,7 @@
#include <QPainter>
#include "canvas.h"
+#include "canvasgesture_pan.h"
#include "canvasgesture_rectselect.h"
#include "fpoint.h"
#include "pageitem.h"
@@ -370,6 +371,17 @@
QRect mpo;
Mxp = m->x();
Myp = m->y();
+
+ if (((m->buttons() & Qt::RightButton) && (m->modifiers() & Qt::ControlModifier)) || ((!(m->modifiers() & Qt::ControlModifier)) && (m->buttons() & Qt::MidButton)))
+ {
+ if (!m_panGesture)
+ {
+ m_panGesture = new PanGesture(this);
+ }
+ m_view->startGesture(m_panGesture);
+ m_panGesture->mousePressEvent(m); // Not an error, this is used to register current canvas point
+ return;
+ }
if (m_doc->m_Selection->count() != 0)
{
More information about the scribus-commit
mailing list