[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Traverso-commit] traverso/src/core ContextPointer.cpp ViewPort.cpp
From: |
Remon Sijrier |
Subject: |
[Traverso-commit] traverso/src/core ContextPointer.cpp ViewPort.cpp |
Date: |
Mon, 29 Oct 2007 15:08:49 +0000 |
CVSROOT: /sources/traverso
Module name: traverso
Changes by: Remon Sijrier <r_sijrier> 07/10/29 15:08:49
Modified files:
src/core : ContextPointer.cpp ViewPort.cpp
Log message:
* when no viewitem is below cursor, set Default cursor
* create a mouse move event after jog hold finishes so the cursor gets
shape of the item below
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/ContextPointer.cpp?cvsroot=traverso&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/ViewPort.cpp?cvsroot=traverso&r1=1.22&r2=1.23
Patches:
Index: ContextPointer.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/ContextPointer.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- ContextPointer.cpp 17 Apr 2007 11:51:20 -0000 1.14
+++ ContextPointer.cpp 29 Oct 2007 15:08:48 -0000 1.15
@@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-$Id: ContextPointer.cpp,v 1.14 2007/04/17 11:51:20 r_sijrier Exp $
+$Id: ContextPointer.cpp,v 1.15 2007/10/29 15:08:48 r_sijrier Exp $
*/
#include "ContextPointer.h"
@@ -160,8 +160,9 @@
{
if (currentViewPort) {
currentViewPort->viewport()->releaseMouse();
- currentViewPort->setCursor(themer()->get_cursor("Default"));
-
+ // This issues a mouse move event, so the cursor
+ // will change to the item that's below it....
+ QCursor::setPos(QCursor::pos()-QPoint(1,1));
}
m_jogTimer.stop();
}
Index: ViewPort.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/ViewPort.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- ViewPort.cpp 26 Jun 2007 20:08:51 -0000 1.22
+++ ViewPort.cpp 29 Oct 2007 15:08:48 -0000 1.23
@@ -144,6 +144,9 @@
QList<QGraphicsItem *> itemsUnderCursor =
scene()->items(mapToScene(event->pos()));
if (itemsUnderCursor.size()) {
itemsUnderCursor.first()->setCursor(itemsUnderCursor.first()->cursor());
+ } else {
+ // If no item is below the mouse, default to default
cursor
+ viewport()->setCursor(themer()->get_cursor("Default"));
}
QApplication::sendEvent(scene(), &mouseEvent);
} else {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Traverso-commit] traverso/src/core ContextPointer.cpp ViewPort.cpp,
Remon Sijrier <=