aboutsummaryrefslogtreecommitdiff
path: root/pageitem.cc
diff options
context:
space:
mode:
Diffstat (limited to 'pageitem.cc')
-rw-r--r--pageitem.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/pageitem.cc b/pageitem.cc
index b5be4cf..9260ecd 100644
--- a/pageitem.cc
+++ b/pageitem.cc
@@ -18,6 +18,8 @@
#include <QtCore/QDebug>
#include <QtGui/QPen>
+#include <QtWidgets/QGraphicsSceneMouseEvent>
+#include "notebookview.h"
#include "pageitem.h"
#include "stfgraphicsitem.h"
@@ -65,6 +67,17 @@ int PageItem::pageNum() const
return _pageNum;
}
+void PageItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
+{
+ QGraphicsView *view = scene()->views().first();
+ if (NotebookView *nbview = qobject_cast<NotebookView*>(view)) {
+ nbview->focusOnPage(_pageNum);
+ event->accept();
+ return;
+ }
+ QGraphicsItem::mouseDoubleClickEvent(event);
+}
+
void PageItem::createStrokes()
{
QStringList pens = _nb->penSerials();