]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Merge remote-tracking branch 'remotes/origin/BR_2017' into HEAD
authorisn <isn@opencascade.com>
Fri, 10 Nov 2017 13:27:02 +0000 (16:27 +0300)
committerisn <isn@opencascade.com>
Fri, 10 Nov 2017 13:27:02 +0000 (16:27 +0300)
src/HYDROGUI/HYDROGUI_BathymetryOp.cxx
src/HYDROGUI/HYDROGUI_BathymetryOp.h
src/HYDROGUI/HYDROGUI_Operations.cxx
src/HYDROGUI/HYDROGUI_ProfileDlg.cxx
src/HYDROGUI/HYDROGUI_ShapeBathymetry.cxx

index 68178b587a5980ee6b1d7677060ba34a231bd781..2af45bc2a8995b51e43347b6615a66b3cd85bc4d 100644 (file)
@@ -106,7 +106,8 @@ void HYDROGUI_BathymetryOp::startOperation()
 
 void HYDROGUI_BathymetryOp::commitOperation()
 {
-  activate( false );
+  if( myMode!=BathymetryTextId )
+    activate( false );
 }
 
 void HYDROGUI_BathymetryOp::abortOperation()
@@ -140,6 +141,7 @@ void HYDROGUI_BathymetryOp::activate( bool isActivate )
     {
       foreach( Handle(HYDROGUI_BathymetryPrs) bath, baths )
         bath->GetShape()->TextLabels( isActivate );
+      commit();
       break;
     }
 
index 2aad488b4ffed43aa6b263774f4e9e381db2a5c8..e76ac11900311fed309fff4cc1c0a9cbf057b508 100644 (file)
@@ -34,12 +34,13 @@ public:
   HYDROGUI_BathymetryOp( HYDROGUI_Module* theModule, int theMode );
   virtual ~HYDROGUI_BathymetryOp();
 
+  void activate( bool );
+
 protected:
   virtual void startOperation();
   virtual void commitOperation();
   virtual void abortOperation();
 
-  void activate( bool );
   OCCViewer_ViewWindow* activeViewWindow() const;
 
 private:
index 8a709139624a18b9b569e5961a139d5ba669b9a4..194e38a18ce1461563025d25363c020dbff01d12 100644 (file)
@@ -877,5 +877,9 @@ void HYDROGUI_Module::onBathymetryText()
   if( isChecked )
     startOperation( BathymetryTextId );
   else
-    operation( BathymetryTextId )->abort();
+  {
+    HYDROGUI_BathymetryOp* op = dynamic_cast<HYDROGUI_BathymetryOp*>( operation( BathymetryTextId ) );
+    if( op )
+      op->activate( false );
+  }
 }
index 92559c7b6397befb24b75a905286b711cedfce01..239645b4c00491401ca5db19036c2cd8835e68d4 100644 (file)
@@ -313,7 +313,12 @@ void HYDROGUI_ProfileDlg::SwitchToProfile(int theIndex)
         anAISObject->SetWidth(1);
     }
   }
-  (*myProfilesPointer)[0]->getDisplayer()->Update();
+
+  if( myProfilesPointer && 
+      myProfilesPointer->size()>0 && 
+      myProfilesPointer->at(0) && 
+      myProfilesPointer->at(0)->getDisplayer() )
+    myProfilesPointer->at(0)->getDisplayer()->Update();
 }
 
 void HYDROGUI_ProfileDlg::onAddBtnPressed(bool)
index f211ae56480fbbd0e4e27861ffc0750604c24af5..dfc3a62cf055cb508153a1561e1ac9aa06ea9b22 100644 (file)
@@ -298,4 +298,5 @@ void HYDROGUI_ShapeBathymetry::TextLabels( bool isOn )
   getContext()->ClearSelected();
   prs->SetTextLabels( selection );
   prs->Redisplay();
+  getContext()->UpdateCurrentViewer();
 }