]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
refs #1340
authorisn <isn@opencascade.com>
Mon, 30 Oct 2017 14:38:37 +0000 (17:38 +0300)
committerisn <isn@opencascade.com>
Wed, 8 Nov 2017 15:27:37 +0000 (18:27 +0300)
Conflicts:
src/HYDROGUI/HYDROGUI_Operations.cxx
src/HYDROGUI/HYDROGUI_Operations.h

src/HYDROGUI/CMakeLists.txt
src/HYDROGUI/HYDROGUI_Module.cxx
src/HYDROGUI/HYDROGUI_Operations.cxx
src/HYDROGUI/HYDROGUI_Operations.h

index b87dca70302bb74c97b54919347392df9224eeee..7a575a8f7117848ae85d970ea9626174bb84344e 100644 (file)
@@ -150,6 +150,7 @@ set(PROJECT_HEADERS
     HYDROGUI_PolylineStyleOp.h
     HYDROGUI_PolylineStyleDlg.h
     HYDROGUI_ZoneTool.h
+       HYDROGUI_RegenerateRegionColorsOp.h
 )
 
 QT_WRAP_MOC(PROJECT_HEADERS_MOC ${PROJECT_HEADERS})
@@ -302,6 +303,7 @@ set(PROJECT_SOURCES
     HYDROGUI_PolylineStyleOp.cxx
     HYDROGUI_PolylineStyleDlg.cxx
     HYDROGUI_ZoneTool.cxx
+       HYDROGUI_RegenerateRegionColorsOp.cxx
 )
 
 add_definitions(
index 9b9f9e5e1bd8beb2fe7dd27c1f6cc5b2ccdecc42..a8097c756797a5ca475f82b1c9eb4bdb9827f620 100644 (file)
@@ -570,6 +570,14 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
       }
       theMenu->addSeparator();
     }
+    else
+    {
+      Handle(HYDROData_CalculationCase) aCalcCase;
+      QString outStr;
+      HYDROGUI_Tool::IsSelectedPartOfCalcCase(this, aCalcCase, outStr);
+      if (outStr == HYDROGUI_DataModel::partitionName( KIND_REGION ))
+        theMenu->addAction( action( RegenerateRegionColorsId ) );
+    }
   }
 
   if( anIsSelectedDataObjects )
index f57063c236323fed679e8b36f387617fad04b199..c14e71723b176028ce8113ada191b94e40968f0e 100644 (file)
@@ -72,6 +72,7 @@
 #include "HYDROGUI_ImportLandCoverMapOp.h"
 #include "HYDROGUI_BathymetrySelectionOp.h"
 #include "HYDROGUI_BathymetryOp.h"
+#include "HYDROGUI_RegenerateRegionColorsOp.h"
 #include "HYDROGUI_PolylineStyleOp.h"
 
 #include <HYDROData_Document.h>
@@ -244,6 +245,7 @@ void HYDROGUI_Module::createActions()
   createAction( LandCoverScalarMapModeOnId, "LC_SCALARMAP_COLORING_ON" );
   createAction( LandCoverScalarMapModeOffId, "LC_SCALARMAP_COLORING_OFF" );
 
+  createAction( RegenerateRegionColorsId, "REGENERATE_REGION_COLORS" );
   createAction( ShowHideArrows, "SHOW_HIDE_ARROWS" );
 }
 
@@ -765,6 +767,8 @@ LightApp_Operation* HYDROGUI_Module::createOperation( const int theId ) const
   case LandCoverScalarMapModeOffId:
     anOp = new HYDROGUI_LandCoverColoringOp( aModule, theId );
     break;
+  case RegenerateRegionColorsId:
+     anOp = new HYDROGUI_RegenerateRegionColorsOp( aModule );
   }
 
   if( !anOp )
index bb168a6920e98b71018f394cd6b78810e37bd4a4..f0ce5bea5ccc2b8d3bee680605a1adbaf586288d 100644 (file)
@@ -144,7 +144,7 @@ enum OperationId
   BathymetryRescaleVisibleId,
   BathymetryRescaleUserId,
   BathymetryRescaleDefaultId,
-
+  RegenerateRegionColorsId,
   ShowHideArrows,
 };