disabled in the 3D view" issue.
if ( !myViewer )
return;
+ if ( !myViewer->isSelectionEnabled() )
+ return;
+
AIS_ListOfInteractive aSelList;
myViewer->getSelectedObjects( aSelList );
for ( AIS_ListIteratorOfListOfInteractive anIt( aSelList ); anIt.More(); anIt.Next() )
LightApp_VTKSelector
::getSelection( SUIT_DataOwnerPtrList& aList ) const
{
- if(myViewer){
+ if( myViewer ) {
+ if( SVTK_Viewer* aSViewer = dynamic_cast<SVTK_Viewer*>(myViewer) ) {
+ if( !aSViewer->isSelectionEnabled() )
+ return;
+ }
if(SUIT_ViewManager* aViewManager = myViewer->getViewManager()){
if(SVTK_ViewManager* aViewMgr = dynamic_cast<SVTK_ViewManager*>(aViewManager)){
if(SVTK_ViewWindow* aView = dynamic_cast<SVTK_ViewWindow*>(aViewMgr->getActiveView())){
win->enableSelection( isEnabled );
}
}
+
+
+ //clear current selection in the viewer
+ if(!isEnabled) {
+ myAISContext->ClearSelected( Standard_True );
+ }
+
}
/*!
{
myPreselectionEnabled = isPreselectionEnabled;
mySelectionEnabled = isSelectionEnabled;
+ //clear current selection in the viewer
+
+ if(!mySelectionEnabled) {
+ myAISContext->ClearSelected( Standard_True );
+ }
}
aView->SetSelectionEnabled( isEnabled );
}
}
+
+ if(!isEnabled) {
+ //clear current selection in the viewer
+ bool blocked = blockSignals( true );
+ if ( SUIT_ViewManager* aViewMgr = getViewManager() ) {
+ if( SVTK_ViewWindow* aViewWindow = dynamic_cast<SVTK_ViewWindow*>( aViewMgr->getActiveView() ) ){
+ if( SVTK_Selector* aSelector = aViewWindow->GetSelector() ) {
+ if(SVTK_View* aView = aViewWindow->getView()){
+ aSelector->ClearIObjects();
+ aView->onSelectionChanged();
+ }
+ }
+ }
+ }
+ blockSignals( blocked );
+ }
+
}
/*!