[Kst] branches/work/kst/portto4/kst/src/libkstapp
Adam Treat
treat at kde.org
Fri Jun 15 17:17:01 CEST 2007
SVN commit 675955 by treat:
* Don't change mouseMode when showing the context menu
M +13 -15 viewitem.cpp
--- branches/work/kst/portto4/kst/src/libkstapp/viewitem.cpp #675954:675955
@@ -639,23 +639,21 @@
if (parentView()->mouseMode() != View::Default) {
parentView()->setMouseMode(View::Default);
parentView()->undoStack()->endMacro();
- return QGraphicsRectItem::mouseReleaseEvent(event);
}
- if (grips().contains(event->pos()))
- return QGraphicsRectItem::mouseReleaseEvent(event);
-
- switch (_mouseMode) {
- case Default:
- case Move:
- case Rotate:
- setMouseMode(Resize);
- break;
- case Resize:
- setMouseMode(Rotate);
- break;
- default:
- break;
+ if (!grips().contains(event->pos()) && event->button() & Qt::LeftButton) {
+ switch (_mouseMode) {
+ case Default:
+ case Move:
+ case Rotate:
+ setMouseMode(Resize);
+ break;
+ case Resize:
+ setMouseMode(Rotate);
+ break;
+ default:
+ break;
+ }
}
QGraphicsRectItem::mouseReleaseEvent(event);
More information about the Kst
mailing list