From: ouv Date: Tue, 11 May 2010 08:59:28 +0000 (+0000) Subject: Issue 0020860: EDF 1404 SMESH: Save operation unavailable after a group creation... X-Git-Tag: V5_1_4~28 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e2a5000a9e609c6d37f44b26636f87adb746b0a6;p=modules%2Fsmesh.git Issue 0020860: EDF 1404 SMESH: Save operation unavailable after a group creation or merge nodes/elements --- diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index fb0d75917..13f22f8dd 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -1483,6 +1483,22 @@ SalomeApp_Study* SMESHGUI::activeStudy() return NULL; } +//============================================================================= +/*! + * + */ +//============================================================================= +void SMESHGUI::Modified( bool theIsUpdateActions ) +{ + if( SalomeApp_Application* app = dynamic_cast( SUIT_Session::session()->activeApplication() ) ) { + if( SalomeApp_Study* appStudy = dynamic_cast( app->activeStudy() ) ) { + appStudy->Modified(); + if( theIsUpdateActions ) + app->updateActions(); + } + } +} + //============================================================================= /*! * @@ -4869,5 +4885,7 @@ int SMESHGUI::addVtkFontPref( const QString& label, const int pId, const QString */ void SMESHGUI::onHypothesisEdit( int result ) { + if( result == 1 ) + SMESHGUI::Modified(); updateObjBrowser( true ); } diff --git a/src/SMESHGUI/SMESHGUI.h b/src/SMESHGUI/SMESHGUI.h index 503740c61..0099a20bd 100644 --- a/src/SMESHGUI/SMESHGUI.h +++ b/src/SMESHGUI/SMESHGUI.h @@ -79,6 +79,8 @@ public : static bool automaticUpdate(); + static void Modified( bool = true ); + virtual LightApp_Displayer* displayer(); virtual QString engineIOR() const; virtual void initialize( CAM_Application* ); diff --git a/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx b/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx index 03ade25cb..3108f8d65 100644 --- a/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx @@ -570,6 +570,8 @@ void SMESHGUI_AddMeshElementDlg::ClickOnApply() myEditCurrentArgument->setText(""); myBusy = false; + + SMESHGUI::Modified(); } } diff --git a/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx b/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx index 601006b70..0e3d0c7a2 100644 --- a/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx @@ -806,6 +806,8 @@ void SMESHGUI_AddQuadraticElementDlg::ClickOnApply() SetEditCorners(); updateButtons(); + + SMESHGUI::Modified(); } //================================================================================= diff --git a/src/SMESHGUI/SMESHGUI_BuildCompoundDlg.cxx b/src/SMESHGUI/SMESHGUI_BuildCompoundDlg.cxx index fe9e5317e..bc6c1daf5 100644 --- a/src/SMESHGUI/SMESHGUI_BuildCompoundDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_BuildCompoundDlg.cxx @@ -331,6 +331,8 @@ bool SMESHGUI_BuildCompoundDlg::ClickOnApply() SMESH::DisplayActor(SMESH::GetActiveWindow(), anActor); }// end IPAL21468 + SMESHGUI::Modified(); + return true; } return false; diff --git a/src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx b/src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx index f5ed5ea15..5b8777753 100644 --- a/src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx +++ b/src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx @@ -27,6 +27,7 @@ // #include "SMESHGUI_ConvToQuadOp.h" +#include "SMESHGUI.h" #include "SMESHGUI_ConvToQuadDlg.h" #include "SMESHGUI_Utils.h" @@ -234,6 +235,7 @@ bool SMESHGUI_ConvToQuadOp::onApply() } if( aResult ) { + SMESHGUI::Modified(); update( UF_ObjBrowser | UF_Model | UF_Viewer ); selectionDone(); } diff --git a/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx b/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx index 1501f0825..864537e84 100644 --- a/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx @@ -574,6 +574,8 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnApply() } //ConstructorsClicked( GetConstructorId() ); busy = false; + + SMESHGUI::Modified(); } } diff --git a/src/SMESHGUI/SMESHGUI_DeleteGroupDlg.cxx b/src/SMESHGUI/SMESHGUI_DeleteGroupDlg.cxx index 95906a3f9..63ce53b12 100644 --- a/src/SMESHGUI/SMESHGUI_DeleteGroupDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_DeleteGroupDlg.cxx @@ -219,6 +219,7 @@ bool SMESHGUI_DeleteGroupDlg::onApply() myListGrp.clear(); mySelectionMgr->clearSelected(); SMESH::UpdateView(); + SMESHGUI::Modified(); mySMESHGUI->updateObjBrowser(true); myBlockSelection = false; diff --git a/src/SMESHGUI/SMESHGUI_EditMeshDlg.cxx b/src/SMESHGUI/SMESHGUI_EditMeshDlg.cxx index 5405ec451..64559a58a 100644 --- a/src/SMESHGUI/SMESHGUI_EditMeshDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_EditMeshDlg.cxx @@ -672,6 +672,7 @@ bool SMESHGUI_EditMeshDlg::ClickOnApply() } SMESH::UpdateView(); + SMESHGUI::Modified(); return true; } diff --git a/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx b/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx index b2ca95017..54ce99d4e 100644 --- a/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx @@ -671,6 +671,8 @@ bool SMESHGUI_ExtrusionAlongPathDlg::ClickOnApply() if ( myMeshActor ) SMESH::Update( myMeshActor->getIO(), myMeshActor->GetVisibility() ); + SMESHGUI::Modified(); + if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ) mySMESHGUI->updateObjBrowser(true); // new groups may appear //SMESH::UpdateView(); diff --git a/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx b/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx index 89ebc7f55..db7f41c49 100644 --- a/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx @@ -572,6 +572,8 @@ bool SMESHGUI_ExtrusionDlg::ClickOnApply() mySelectionMgr->clearSelected(); mySelectedObject = SMESH::SMESH_IDSource::_nil(); SelectionIntoArgument(); + + SMESHGUI::Modified(); } return true; } diff --git a/src/SMESHGUI/SMESHGUI_GroupDlg.cxx b/src/SMESHGUI/SMESHGUI_GroupDlg.cxx index 351c4bc1f..28461ee4f 100644 --- a/src/SMESHGUI/SMESHGUI_GroupDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_GroupDlg.cxx @@ -852,6 +852,7 @@ bool SMESHGUI_GroupDlg::onApply() } } + SMESHGUI::Modified(); mySMESHGUI->updateObjBrowser(true); SMESH::UpdateView(); // asv: fix of BUG PAL5515 mySelectionMgr->clearSelected(); @@ -957,6 +958,7 @@ bool SMESHGUI_GroupDlg::onApply() } } + SMESHGUI::Modified(); mySMESHGUI->updateObjBrowser(true); mySelectionMgr->clearSelected(); return true; diff --git a/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx b/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx index f5b003709..9fefa98da 100644 --- a/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx @@ -27,6 +27,7 @@ #include "SMESHGUI_GroupOnShapeDlg.h" #include "SMESH_TypeFilter.hxx" +#include "SMESHGUI.h" #include "SMESHGUI_Utils.h" #include "SMESHGUI_GEOMGenUtils.h" @@ -347,6 +348,8 @@ bool SMESHGUI_GroupOnShapeOp::onApply() group = mesh->CreateGroupFromGEOM( elemType, name.toLatin1().data(), geom ); } } + SMESHGUI::Modified(); + update( UF_ObjBrowser | UF_Model ); init(); diff --git a/src/SMESHGUI/SMESHGUI_GroupOpDlg.cxx b/src/SMESHGUI/SMESHGUI_GroupOpDlg.cxx index 15d772347..39941b26a 100644 --- a/src/SMESHGUI/SMESHGUI_GroupOpDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_GroupOpDlg.cxx @@ -604,6 +604,7 @@ bool SMESHGUI_UnionGroupsDlg::onApply() if ( aRes ) { + SMESHGUI::Modified(); getSMESHGUI()->updateObjBrowser(true); reset(); return true; @@ -706,6 +707,7 @@ bool SMESHGUI_IntersectGroupsDlg::onApply() if ( aRes ) { + SMESHGUI::Modified(); getSMESHGUI()->updateObjBrowser(true); reset(); return true; @@ -872,6 +874,7 @@ bool SMESHGUI_CutGroupsDlg::onApply() if ( aRes ) { + SMESHGUI::Modified(); getSMESHGUI()->updateObjBrowser(true); reset(); return true; @@ -1023,6 +1026,7 @@ bool SMESHGUI_DimGroupDlg::onApply() if ( aRes ) { + SMESHGUI::Modified(); getSMESHGUI()->updateObjBrowser(true); reset(); return true; diff --git a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx index e8d9204f8..005e6a873 100644 --- a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx @@ -414,6 +414,7 @@ namespace SMESH if (aHypSObject) { if (!aHypName.isEmpty()) SMESH::SetName(aHypSObject, aHypName); + SMESHGUI::Modified(); SMESHGUI::GetSMESHGUI()->updateObjBrowser(); return aHypothesis._retn(); } diff --git a/src/SMESHGUI/SMESHGUI_Make2DFrom3DOp.cxx b/src/SMESHGUI/SMESHGUI_Make2DFrom3DOp.cxx index fb404641f..ffbc3b80d 100644 --- a/src/SMESHGUI/SMESHGUI_Make2DFrom3DOp.cxx +++ b/src/SMESHGUI/SMESHGUI_Make2DFrom3DOp.cxx @@ -233,6 +233,7 @@ void SMESHGUI_Make2DFrom3DOp::startOperation() myDlg->SetMeshInfo( aNewInfo ); myDlg->show(); /*exec();*/ commit(); + SMESHGUI::Modified(); } //================================================================================ diff --git a/src/SMESHGUI/SMESHGUI_MakeNodeAtPointDlg.cxx b/src/SMESHGUI/SMESHGUI_MakeNodeAtPointDlg.cxx index 0792b596c..ee35301f0 100644 --- a/src/SMESHGUI/SMESHGUI_MakeNodeAtPointDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MakeNodeAtPointDlg.cxx @@ -424,6 +424,7 @@ bool SMESHGUI_MakeNodeAtPointOp::onApply() aList.Append(myMeshActor->getIO()); selectionMgr()->setSelectedObjects(aList,false); SMESH::UpdateView(); + SMESHGUI::Modified(); } } catch (const SALOME::SALOME_Exception& S_ex) { diff --git a/src/SMESHGUI/SMESHGUI_MeshOp.cxx b/src/SMESHGUI/SMESHGUI_MeshOp.cxx index 1739b419c..4ceb159ee 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOp.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshOp.cxx @@ -150,7 +150,10 @@ bool SMESHGUI_MeshOp::onApply() else if ( !myToCreate ) aResult = editMeshOrSubMesh( aMess ); if ( aResult ) + { + SMESHGUI::Modified(); update( UF_ObjBrowser | UF_Model ); + } } catch ( const SALOME::SALOME_Exception& S_ex ) { diff --git a/src/SMESHGUI/SMESHGUI_MeshOrderOp.cxx b/src/SMESHGUI/SMESHGUI_MeshOrderOp.cxx index 494d4eabf..511191c13 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOrderOp.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshOrderOp.cxx @@ -138,6 +138,9 @@ bool SMESHGUI_MeshOrderOp::onApply() SUIT_OverrideCursor aWaitCursor; bool res = myMgr ? myMgr->SetMeshOrder() : false; + if( res ) + SMESHGUI::Modified(); + delete myMgr; myMgr = 0; diff --git a/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx b/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx index f08d017d9..2f3a7a235 100755 --- a/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx @@ -510,6 +510,7 @@ bool SMESHGUI_MeshPatternDlg::onApply() } mySelectionMgr->clearSelected(); SMESH::UpdateView(); + SMESHGUI::Modified(); mySMESHGUI->updateObjBrowser(true); diff --git a/src/SMESHGUI/SMESHGUI_MoveNodesDlg.cxx b/src/SMESHGUI/SMESHGUI_MoveNodesDlg.cxx index f4c26bb9f..ac5438382 100644 --- a/src/SMESHGUI/SMESHGUI_MoveNodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MoveNodesDlg.cxx @@ -356,6 +356,7 @@ bool SMESHGUI_MoveNodesDlg::onApply() aList.Append(myMeshActor->getIO()); mySelectionMgr->setSelectedObjects(aList,false); SMESH::UpdateView(); + SMESHGUI::Modified(); reset(); } diff --git a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx index 98b047400..341ffb284 100755 --- a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx @@ -1052,6 +1052,7 @@ bool SMESHGUI_MultiEditDlg::onApply() mySelector->ClearIndex(); mySelectionMgr->setSelectedObjects( sel ); SMESH::UpdateView(); + SMESHGUI::Modified(); } myListBox->clear(); diff --git a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx index d12100ca2..b0b793b1f 100644 --- a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx @@ -526,6 +526,9 @@ bool SMESHGUI_NodesDlg::ClickOnApply() } } } + + SMESHGUI::Modified(); + return true; } diff --git a/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.cxx b/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.cxx index c6ff898f3..44f495fb3 100644 --- a/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.cxx @@ -244,6 +244,7 @@ void SMESHGUI_RemoveElementsDlg::ClickOnApply() myEditCurrentArgument->clear(); mySelector->ClearIndex(); SMESH::UpdateView(); + SMESHGUI::Modified(); } } } diff --git a/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.cxx b/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.cxx index fc6c78a30..3fcef3f95 100644 --- a/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.cxx @@ -246,6 +246,7 @@ void SMESHGUI_RemoveNodesDlg::ClickOnApply() myEditCurrentArgument->clear(); mySelector->ClearIndex(); SMESH::UpdateView(); + SMESHGUI::Modified(); } SMESH::SetPointRepresentation(true); diff --git a/src/SMESHGUI/SMESHGUI_RenumberingDlg.cxx b/src/SMESHGUI/SMESHGUI_RenumberingDlg.cxx index 5ebfe5062..67a1a4220 100644 --- a/src/SMESHGUI/SMESHGUI_RenumberingDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RenumberingDlg.cxx @@ -243,6 +243,7 @@ void SMESHGUI_RenumberingDlg::ClickOnApply() //mySelectionMgr->clearSelected(); SMESH::UpdateView(); + SMESHGUI::Modified(); } } diff --git a/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx b/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx index f6edc503f..d4f406891 100644 --- a/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx @@ -557,6 +557,8 @@ bool SMESHGUI_RevolutionDlg::ClickOnApply() ConstructorsClicked(GetConstructorId()); mySelectedObject = SMESH::SMESH_IDSource::_nil(); SelectionIntoArgument(); + + SMESHGUI::Modified(); } return true; diff --git a/src/SMESHGUI/SMESHGUI_RotationDlg.cxx b/src/SMESHGUI/SMESHGUI_RotationDlg.cxx index f2855bb7a..f5f03e0ef 100644 --- a/src/SMESHGUI/SMESHGUI_RotationDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RotationDlg.cxx @@ -456,6 +456,8 @@ bool SMESHGUI_RotationDlg::ClickOnApply() Init(false); mySelectedObject = SMESH::SMESH_IDSource::_nil(); SelectionIntoArgument(); + + SMESHGUI::Modified(); } return true; diff --git a/src/SMESHGUI/SMESHGUI_ScaleDlg.cxx b/src/SMESHGUI/SMESHGUI_ScaleDlg.cxx index 97976bf04..3eb8b7138 100644 --- a/src/SMESHGUI/SMESHGUI_ScaleDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ScaleDlg.cxx @@ -526,6 +526,8 @@ bool SMESHGUI_ScaleDlg::ClickOnApply() ConstructorsClicked(GetConstructorId()); mySelectedObject = SMESH::SMESH_IDSource::_nil(); SelectionIntoArgument(); + + SMESHGUI::Modified(); } return true; diff --git a/src/SMESHGUI/SMESHGUI_SewingDlg.cxx b/src/SMESHGUI/SMESHGUI_SewingDlg.cxx index cd63b5e12..cc8fbf136 100644 --- a/src/SMESHGUI/SMESHGUI_SewingDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_SewingDlg.cxx @@ -533,6 +533,8 @@ bool SMESHGUI_SewingDlg::ClickOnApply() Init(); ConstructorsClicked(GetConstructorId()); + + SMESHGUI::Modified(); } } diff --git a/src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx b/src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx index bb73bcbd5..d005010e4 100755 --- a/src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx @@ -514,6 +514,7 @@ bool SMESHGUI_SingleEditDlg::onApply() mySelectionMgr->setSelectedObjects(aList, false); onSelectionDone(); SMESH::UpdateView(); + SMESHGUI::Modified(); } return aResult; diff --git a/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx b/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx index 3b83752eb..4f24c4dd4 100644 --- a/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx @@ -395,6 +395,7 @@ bool SMESHGUI_SmoothingDlg::ClickOnApply() } SMESH::UpdateView(); + SMESHGUI::Modified(); Init(); mySelectedObject = SMESH::SMESH_IDSource::_nil(); diff --git a/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx b/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx index 6fec286e3..a6a8a4ac7 100644 --- a/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx @@ -546,6 +546,8 @@ bool SMESHGUI_SymmetryDlg::ClickOnApply() ConstructorsClicked(GetConstructorId()); mySelectedObject = SMESH::SMESH_IDSource::_nil(); SelectionIntoArgument(); + + SMESHGUI::Modified(); } return true; } diff --git a/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx b/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx index 6b2e2398d..bb6d11167 100644 --- a/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx @@ -530,6 +530,8 @@ bool SMESHGUI_TranslationDlg::ClickOnApply() ConstructorsClicked(GetConstructorId()); mySelectedObject = SMESH::SMESH_IDSource::_nil(); SelectionIntoArgument(); + + SMESHGUI::Modified(); } return true;