[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Traverso-commit] traverso/src core/ViewPort.h traverso/Interface...
From: |
Remon Sijrier |
Subject: |
[Traverso-commit] traverso/src core/ViewPort.h traverso/Interface... |
Date: |
Fri, 07 Dec 2007 15:43:02 +0000 |
CVSROOT: /sources/traverso
Module name: traverso
Changes by: Remon Sijrier <r_sijrier> 07/12/07 15:43:02
Modified files:
src/core : ViewPort.h
src/traverso : Interface.cpp
Log message:
* delegate mouse move events to the current ViewPort (if any) when the
mouse moves over a 'Context' QMenu.
Now, when closing the menu and _not_ moving the mouse dispatches new
input events to the correct ViewItem
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/ViewPort.h?cvsroot=traverso&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/Interface.cpp?cvsroot=traverso&r1=1.117&r2=1.118
Patches:
Index: core/ViewPort.h
===================================================================
RCS file: /sources/traverso/traverso/src/core/ViewPort.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- core/ViewPort.h 24 Nov 2007 23:12:05 -0000 1.15
+++ core/ViewPort.h 7 Dec 2007 15:43:02 -0000 1.16
@@ -75,6 +75,9 @@
HoldCursor* m_holdcursor;
QPoint m_oldMousePos;
QPointF lastMouseMoveScenePoint;
+
+ // Interface wants to call mouseMoveEvent()
+ friend class Interface;
};
Index: traverso/Interface.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/Interface.cpp,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -b -r1.117 -r1.118
--- traverso/Interface.cpp 6 Dec 2007 20:51:59 -0000 1.117
+++ traverso/Interface.cpp 7 Dec 2007 15:43:02 -0000 1.118
@@ -374,6 +374,15 @@
QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
ie().catch_key_release(keyEvent);
return true;
+ } else if (event->type() == QEvent::MouseMove) {
+ // Also send mouse move events to the current viewport
+ // so in case we close the Menu, and
_do_not_move_the_mouse
+ // and perform an action, it could be delegated to the
wrong ViewItem!
+ QMouseEvent* mouseEvent =
static_cast<QMouseEvent*>(event);
+ ViewPort* vp = cpointer().get_viewport();
+ if (vp) {
+ vp->mouseMoveEvent(mouseEvent);
+ }
} else {
return false;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Traverso-commit] traverso/src core/ViewPort.h traverso/Interface...,
Remon Sijrier <=