]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
VISU 2008 - Unification of the VISU selection functionality (debug)
authorouv <ouv@opencascade.com>
Fri, 30 May 2008 10:21:45 +0000 (10:21 +0000)
committerouv <ouv@opencascade.com>
Fri, 30 May 2008 10:21:45 +0000 (10:21 +0000)
src/VISUGUI/VisuGUI.cxx
src/VISUGUI/VisuGUI.h
src/VISUGUI/VisuGUI_SelectionPanel.cxx
src/VISUGUI/VisuGUI_SelectionPanel.h

index f0ab08f5a13d6404c47ed81c4496becf5bdeab12..a7b7c0fef1e878159e1980d4d4a92a67d7ecfe88 100644 (file)
@@ -1834,6 +1834,18 @@ VisuGUI
   }
 }
 
+//----------------------------------------------------------------------------
+void
+VisuGUI
+::OnSwitchSelectionMode( int theId )
+{
+  for( int anId = VISU_ACTOR_SELECTION; anId <= VISU_GAUSS_POINT_SELECTION; anId++ )
+  {
+    QAction* aRefAction = action( anId );
+    aRefAction->setChecked( anId == VISU_ACTOR_SELECTION + theId );
+  }
+}
+
 //----------------------------------------------------------------------------
 void
 VisuGUI
@@ -2759,6 +2771,7 @@ void VisuGUI::createSelectionPanel()
 {
   mySelectionPanel = new VisuGUI_SelectionPanel( this );
   mySelectionPanel->update();
+  connect( mySelectionPanel, SIGNAL( selectionModeChanged( int ) ), this, SLOT( OnSwitchSelectionMode( int ) ) );
 }
 
 //***************************************************************************
index 560f7c2edd3f747ef0fdea309ef327d8c5e7570a..92ba9595f24380b315a0fbb463f861ec1fd9efa5 100644 (file)
@@ -134,6 +134,7 @@ protected slots:
 
   void OnToggleSelectionPanel();
   void OnSwitchSelectionMode();
+  void OnSwitchSelectionMode( int );
 
   void OnMakeSurfaceframe();
   void OnMakeInsideframe();
index 16e5ce69f41b00614ea6e3f640ccaea64714d4fd..0d5a6e2ff83c0b57d88ba6bcf4809b020a994cda 100644 (file)
@@ -440,6 +440,8 @@ void VisuGUI_SelectionPanel::onSelectionModeChanged( int theId )
     onSelectionEvent();
     break;
   }
+
+  emit selectionModeChanged( theId );
 }
 
 void VisuGUI_SelectionPanel::showEvent( QShowEvent* theEvent )
index 17aad529544525e38a52b768692419deee889374..12cdbffdeaaa04620ed710d7422d31344cee4b12 100644 (file)
@@ -87,6 +87,9 @@ private slots:
   void                      onPointIdEdit();
   void                      onCellIdEdit();
 
+signals:
+  void                      selectionModeChanged( int );
+
 private:
   void                      clearFields();