: SUIT_ViewModel(),
mySelector( 0 ),
myTransformer( 0 ),
- myIsInitialized( false )
+ myIsInitialized( false ),
+ myIsImmediateSelectionEnabled( false )
{
}
myIsInitialized = theFlag;
}
+//================================================================
+// Function : setIsImmediateSelectionEnabled
+// Purpose :
+//================================================================
+void GraphicsView_Viewer::setIsImmediateSelectionEnabled( bool theFlag )
+{
+ myIsImmediateSelectionEnabled = theFlag;
+}
+
//================================================================
// Function : createTransformer
// Purpose :
else if ( bs == GraphicsView_ViewTransformer::panButton() )
activateTransform( Pan );
}
+ else if ( e->button() == Qt::RightButton && isImmediateSelectionEnabled() )
+ {
+ bool append = bool ( e->modifiers() & GraphicsView_Selector::getAppendKey() );
+ getSelector()->select( QRectF(), append );
+ }
else // checking for other operations before selection in release event
startOperations( e );
}
bool isInitialized() const { return myIsInitialized; }
void setIsInitialized( bool );
+ bool isImmediateSelectionEnabled() const { return myIsImmediateSelectionEnabled; }
+ void setIsImmediateSelectionEnabled( bool );
+
signals:
void selectionChanged( GV_SelectionChangeStatus );
GraphicsView_ViewTransformer* myTransformer;
bool myIsInitialized;
+ bool myIsImmediateSelectionEnabled;
};
#endif