[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Traverso-commit] traverso/src/core ViewPort.cpp ViewPort.h
From: |
Remon Sijrier |
Subject: |
[Traverso-commit] traverso/src/core ViewPort.cpp ViewPort.h |
Date: |
Sat, 24 Nov 2007 23:12:05 +0000 |
CVSROOT: /sources/traverso
Module name: traverso
Changes by: Remon Sijrier <r_sijrier> 07/11/24 23:12:05
Modified files:
src/core : ViewPort.cpp ViewPort.h
Log message:
m_holdCursorActive is a replacement for m_holdcursor->isVisible() in
mouseMoveEvents, which crashes when a hold action in one viewport ends with the
mouse upon a different viewport. Should get a proper fix ?
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/ViewPort.cpp?cvsroot=traverso&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/ViewPort.h?cvsroot=traverso&r1=1.14&r2=1.15
Patches:
Index: ViewPort.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/ViewPort.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- ViewPort.cpp 5 Nov 2007 15:49:30 -0000 1.24
+++ ViewPort.cpp 24 Nov 2007 23:12:04 -0000 1.25
@@ -103,6 +103,11 @@
m_holdcursor = new HoldCursor();
scene->addItem(m_holdcursor);
m_holdcursor->hide();
+ // m_holdCursorActive is a replacement for m_holdcursor->isVisible()
+ // in mouseMoveEvents, which crashes when a hold action in one viewport
+ // ends with the mouse upon a different viewport.
+ // Should get a proper fix ?
+ m_holdCursorActive = false;
}
ViewPort::~ViewPort()
@@ -153,7 +158,7 @@
// It can happen that a cursor is set for a newly created
viewitem
// but we don't want that when the holdcursor is set!
// So force it back to be a blankcursor.
- if (m_holdcursor->isVisible() && viewport()->cursor().shape()
!= Qt::BlankCursor) {
+ if (m_holdCursorActive /* was m_holdcursor->isVisible() */ &&
viewport()->cursor().shape() != Qt::BlankCursor) {
viewport()->setCursor(Qt::BlankCursor);
}
}
@@ -236,6 +241,7 @@
viewport()->unsetCursor();
m_holdcursor->hide();
m_holdcursor->reset();
+ m_holdCursorActive = false;
}
void ViewPort::set_holdcursor( const QString & cursorName )
@@ -245,6 +251,7 @@
m_holdcursor->setPos(cpointer().scene_pos());
m_holdcursor->set_type(cursorName);
m_holdcursor->show();
+ m_holdCursorActive = true;
}
void ViewPort::set_holdcursor_text( const QString & text )
Index: ViewPort.h
===================================================================
RCS file: /sources/traverso/traverso/src/core/ViewPort.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- ViewPort.h 12 Apr 2007 17:06:57 -0000 1.14
+++ ViewPort.h 24 Nov 2007 23:12:05 -0000 1.15
@@ -71,6 +71,7 @@
private:
int m_mode;
+ bool m_holdCursorActive;
HoldCursor* m_holdcursor;
QPoint m_oldMousePos;
QPointF lastMouseMoveScenePoint;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Traverso-commit] traverso/src/core ViewPort.cpp ViewPort.h,
Remon Sijrier <=