- bool hadSelection = ( myNumSelected > 0 ); /* something was selected */
- if ( hadSelection && !myEnableMultipleSelection)
- return false;
+ int numBefore = numSelected();
+
+ myAISContext->ShiftSelect(left,top,right,bottom, view);
+
+ /* send notifications */
+ checkSelection ( numBefore );
+}
+
+/*!
+ Enables/disables selection
+*/
+void OCCViewer_AISSelector::enableSelection( bool bEnable )
+{
+ myEnableSelection = bEnable;
+}
+
+/*!
+ Enables/disables multiple selection i.e
+ selection of several objects at the same time.
+ If enabled, non-multiple selection is enabled as well.
+*/
+void OCCViewer_AISSelector::enableMultipleSelection( bool bEnable )
+{
+ myEnableMultipleSelection = bEnable;
+ if ( bEnable ) myEnableSelection = bEnable;
+}
+
+/*!
+ Returns the number of selected objects.
+*/
+int OCCViewer_AISSelector::numSelected() const
+{
+ if ( myAISContext.IsNull() )
+ return 0;