TransformState state = EnTrain;
QMouseEvent* me = ( QMouseEvent* )e;
- myButtonState = me->modifiers();
+ myButtonState = me->buttons();
if ( e->type() == QEvent::MouseButtonPress )
myButtonState |= me->button(); /* add pressed button */
+ if ( e->type() == QEvent::MouseButtonRelease )
+ myButtonState |= me->button(); /* add release button */
+
int mouseOnlyState = ( myButtonState & ( Qt::LeftButton | Qt::MidButton | Qt::RightButton ) );
if ( myStart.isNull() )
{
myMajorBtn = mouseOnlyState;
}
- if ( e->type() == QEvent::MouseButtonRelease && mouseOnlyState == myMajorBtn )
+ if ( e->type() == QEvent::MouseButtonRelease )
{
state = Fin;
}
SketchState state = EnTrain;
QMouseEvent* me = (QMouseEvent*)e;
- myButtonState = me->modifiers();
+ myButtonState = me->buttons();
if ( e->type() == QEvent::MouseButtonPress )
myButtonState |= me->button(); /* add pressed button */