From: asl Date: Tue, 7 Nov 2017 13:27:45 +0000 (+0300) Subject: correction after merge X-Git-Tag: v2.1~57 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4e105b777ea15e1033264568078cfd6df5341e33;p=modules%2Fhydro.git correction after merge --- diff --git a/src/HYDROGUI/CMakeLists.txt b/src/HYDROGUI/CMakeLists.txt index e0909451..b87dca70 100644 --- a/src/HYDROGUI/CMakeLists.txt +++ b/src/HYDROGUI/CMakeLists.txt @@ -96,7 +96,6 @@ set(PROJECT_HEADERS HYDROGUI_StricklerTableOp.h HYDROGUI_StricklerTypeComboBox.h HYDROGUI_SubmersibleOp.h - HYDROGUI_UnSubmersibleOp.h HYDROGUI_Tool.h HYDROGUI_Tool2.h HYDROGUI_TwoImagesDlg.h @@ -151,7 +150,6 @@ set(PROJECT_HEADERS HYDROGUI_PolylineStyleOp.h HYDROGUI_PolylineStyleDlg.h HYDROGUI_ZoneTool.h - HYDROGUI_RegenerateRegionColorsOp.h ) QT_WRAP_MOC(PROJECT_HEADERS_MOC ${PROJECT_HEADERS}) @@ -249,7 +247,6 @@ set(PROJECT_SOURCES HYDROGUI_SplitPolylinesDlg.cxx HYDROGUI_SplitPolylinesOp.cxx HYDROGUI_SubmersibleOp.cxx - HYDROGUI_UnSubmersibleOp.cxx HYDROGUI_Tool.cxx HYDROGUI_Tool2.cxx HYDROGUI_TwoImagesDlg.cxx @@ -305,7 +302,6 @@ set(PROJECT_SOURCES HYDROGUI_PolylineStyleOp.cxx HYDROGUI_PolylineStyleDlg.cxx HYDROGUI_ZoneTool.cxx - HYDROGUI_RegenerateRegionColorsOp.cxx ) add_definitions( diff --git a/src/HYDROGUI/HYDROGUI_Module.cxx b/src/HYDROGUI/HYDROGUI_Module.cxx index c21abdfc..36d652a7 100644 --- a/src/HYDROGUI/HYDROGUI_Module.cxx +++ b/src/HYDROGUI/HYDROGUI_Module.cxx @@ -570,14 +570,6 @@ 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 ) diff --git a/src/HYDROGUI/HYDROGUI_Operations.cxx b/src/HYDROGUI/HYDROGUI_Operations.cxx index 259ac301..f57063c2 100644 --- a/src/HYDROGUI/HYDROGUI_Operations.cxx +++ b/src/HYDROGUI/HYDROGUI_Operations.cxx @@ -60,7 +60,6 @@ #include "HYDROGUI_ProfileInterpolateOp.h" #include "HYDROGUI_RecognizeContoursOp.h" #include "HYDROGUI_SubmersibleOp.h" -#include "HYDROGUI_UnSubmersibleOp.h" #include "HYDROGUI_StricklerTableOp.h" #include "HYDROGUI_DuplicateOp.h" #include "HYDROGUI_LandCoverMapOp.h" @@ -74,7 +73,6 @@ #include "HYDROGUI_BathymetrySelectionOp.h" #include "HYDROGUI_BathymetryOp.h" #include "HYDROGUI_PolylineStyleOp.h" -#include "HYDROGUI_RegenerateRegionColorsOp.h" #include #include @@ -247,8 +245,6 @@ void HYDROGUI_Module::createActions() createAction( LandCoverScalarMapModeOffId, "LC_SCALARMAP_COLORING_OFF" ); createAction( ShowHideArrows, "SHOW_HIDE_ARROWS" ); - createAction( RegenerateRegionColorsId, "REGENERATE_REGION_COLORS" ); - } void HYDROGUI_Module::createMenus() @@ -751,10 +747,10 @@ LightApp_Operation* HYDROGUI_Module::createOperation( const int theId ) const anOp = new HYDROGUI_ShowHideOp( aModule, theId ); break; case SubmersibleId: - anOp = new HYDROGUI_SubmersibleOp( aModule ); + anOp = new HYDROGUI_SubmersibleOp( aModule, true ); break; case UnSubmersibleId: - anOp = new HYDROGUI_UnSubmersibleOp( aModule ); + anOp = new HYDROGUI_SubmersibleOp( aModule, false ); break; case PolylineExtractionId: anOp = new HYDROGUI_PolylineExtractionOp( aModule ); @@ -769,8 +765,6 @@ 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 ) diff --git a/src/HYDROGUI/HYDROGUI_Operations.h b/src/HYDROGUI/HYDROGUI_Operations.h index 88afbe3c..bb168a69 100644 --- a/src/HYDROGUI/HYDROGUI_Operations.h +++ b/src/HYDROGUI/HYDROGUI_Operations.h @@ -146,7 +146,6 @@ enum OperationId BathymetryRescaleDefaultId, ShowHideArrows, - RegenerateRegionColorsId }; #endif diff --git a/src/HYDROGUI/HYDROGUI_SubmersibleOp.cxx b/src/HYDROGUI/HYDROGUI_SubmersibleOp.cxx index af10438a..40b21fc5 100644 --- a/src/HYDROGUI/HYDROGUI_SubmersibleOp.cxx +++ b/src/HYDROGUI/HYDROGUI_SubmersibleOp.cxx @@ -20,8 +20,8 @@ #include #include -HYDROGUI_SubmersibleOp::HYDROGUI_SubmersibleOp( HYDROGUI_Module* theModule ) - : HYDROGUI_Operation( theModule ) +HYDROGUI_SubmersibleOp::HYDROGUI_SubmersibleOp( HYDROGUI_Module* theModule, bool isSubmersible ) + : HYDROGUI_Operation( theModule ), myIsSubmersible( isSubmersible ) { } @@ -46,9 +46,7 @@ bool HYDROGUI_SubmersibleOp::processApply( int& theUpdateFlags, QString& theErro theUpdateFlags = 0; if( isOK ) { - bool IsSubmersible = myObject->IsSubmersible(); - if (!IsSubmersible) - myObject->SetIsSubmersible( true ); + myObject->SetIsSubmersible( myIsSubmersible ); theUpdateFlags = 0; } return isOK; diff --git a/src/HYDROGUI/HYDROGUI_SubmersibleOp.h b/src/HYDROGUI/HYDROGUI_SubmersibleOp.h index e4f26a56..e2c2d473 100644 --- a/src/HYDROGUI/HYDROGUI_SubmersibleOp.h +++ b/src/HYDROGUI/HYDROGUI_SubmersibleOp.h @@ -27,7 +27,7 @@ class HYDROGUI_SubmersibleOp : public HYDROGUI_Operation Q_OBJECT public: - HYDROGUI_SubmersibleOp( HYDROGUI_Module* theModule ); + HYDROGUI_SubmersibleOp( HYDROGUI_Module* theModule, bool isSubmersible ); virtual ~HYDROGUI_SubmersibleOp(); protected: @@ -37,6 +37,7 @@ protected: private: Handle(HYDROData_Object) myObject; + bool myIsSubmersible; }; #endif diff --git a/src/HYDROGUI/HYDROGUI_UnSubmersibleOp.cxx b/src/HYDROGUI/HYDROGUI_UnSubmersibleOp.cxx deleted file mode 100644 index 5fb28bfd..00000000 --- a/src/HYDROGUI/HYDROGUI_UnSubmersibleOp.cxx +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (C) 2014-2015 EDF-R&D -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include -#include -#include - -HYDROGUI_UnSubmersibleOp::HYDROGUI_UnSubmersibleOp( HYDROGUI_Module* theModule ) - : HYDROGUI_Operation( theModule ) -{ -} - -HYDROGUI_UnSubmersibleOp::~HYDROGUI_UnSubmersibleOp() -{ -} - -void HYDROGUI_UnSubmersibleOp::startOperation() -{ - HYDROGUI_Operation::startOperation(); - myObject = Handle(HYDROData_Object)::DownCast( HYDROGUI_Tool::GetSelectedObject( module() ) ); - if( myObject.IsNull() ) - onCancel(); - else - onApply(); -} - -bool HYDROGUI_UnSubmersibleOp::processApply( int& theUpdateFlags, QString& theErrorMsg, QStringList& theBrowseObjectsEntries ) -{ - theUpdateFlags = 0; - if( !myObject.IsNull() ) - { - bool IsSubmersible = myObject->IsSubmersible(); - if (IsSubmersible) - myObject->SetIsSubmersible( false ); - return true; - } - return false; -} - diff --git a/src/HYDROGUI/HYDROGUI_UnSubmersibleOp.h b/src/HYDROGUI/HYDROGUI_UnSubmersibleOp.h deleted file mode 100644 index 6d0ffb94..00000000 --- a/src/HYDROGUI/HYDROGUI_UnSubmersibleOp.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (C) 2014-2015 EDF-R&D -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef HYDROGUI_UNSubmersibleOP_H -#define HYDROGUI_UNSubmersibleOP_H - -#include -#include - -class HYDROGUI_UnSubmersibleOp : public HYDROGUI_Operation -{ - Q_OBJECT - -public: - HYDROGUI_UnSubmersibleOp( HYDROGUI_Module* theModule ); - virtual ~HYDROGUI_UnSubmersibleOp(); - -protected: - virtual void startOperation(); - virtual bool processApply( int& theUpdateFlags, QString& theErrorMsg, - QStringList& theBrowseObjectsEntries ); - -private: - Handle(HYDROData_Object) myObject; -}; - -#endif