From 9db5f5f59cdeae3bda3335984b0bf10b63d05664 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 26 Jan 2022 13:38:57 +0300 Subject: [PATCH] Fix messages and indentation --- src/SMESHGUI/SMESHGUI.cxx | 28 ++++++++++++++-------------- src/SMESHGUI/SMESH_msg_en.ts | 8 ++++++++ src/SMESH_I/SMESH_Gen_i_1.cxx | 8 ++++---- 3 files changed, 26 insertions(+), 18 deletions(-) diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index 6cf1f3823..0c2778ad5 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -2084,20 +2084,20 @@ void SMESHGUI::OnEditDelete() SMESH::RemoveHypothesisOrAlgorithmOnMesh(IObject); aStudyBuilder->RemoveObjectWithChildren( SO ); } - else {// default action: remove SObject from the study - // Find Sub-Meshes and Group and delete corresopning visual objects and actors - _PTR(ChildIterator) it1 = aStudy->NewChildIterator(SO); - for (it1->InitEx(false); it1->More(); it1->Next()) { - _PTR(SObject) SObj = it1->Value(); - if (!SObj) continue; - if (SObj->FindAttribute(anAttr, "AttributeIOR")) { - SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow(SMESH::SObjectToObject(SObj)); - SMESH::SMESH_subMesh_var aSubMesh = SMESH::SMESH_subMesh::_narrow(SMESH::SObjectToObject(SObj)); - if (!aGroup->_is_nil() || !aSubMesh->_is_nil()) { - SMESH::RemoveVisualObjectWithActors(SObj->GetID().c_str(), true); - } - } - } + else {// default action: remove SObject from the study + // Find Sub-Meshes and Group and delete corresopning visual objects and actors + _PTR(ChildIterator) it1 = aStudy->NewChildIterator(SO); + for (it1->InitEx(false); it1->More(); it1->Next()) { + _PTR(SObject) SObj = it1->Value(); + if (!SObj) continue; + if (SObj->FindAttribute(anAttr, "AttributeIOR")) { + SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow(SMESH::SObjectToObject(SObj)); + SMESH::SMESH_subMesh_var aSubMesh = SMESH::SMESH_subMesh::_narrow(SMESH::SObjectToObject(SObj)); + if (!aGroup->_is_nil() || !aSubMesh->_is_nil()) { + SMESH::RemoveVisualObjectWithActors(SObj->GetID().c_str(), true); + } + } + } // san - it's no use opening a transaction here until UNDO/REDO is provided in SMESH //SUIT_Operation *op = new SALOMEGUI_ImportOperation(myActiveStudy); //op->start(); diff --git a/src/SMESHGUI/SMESH_msg_en.ts b/src/SMESHGUI/SMESH_msg_en.ts index 827d8ab82..871b155b0 100644 --- a/src/SMESHGUI/SMESH_msg_en.ts +++ b/src/SMESHGUI/SMESH_msg_en.ts @@ -3296,6 +3296,10 @@ Use Display Entity menu command to show them. STB_COMPUTE Compute + + STB_RE_COMPUTE + Clear + Compute + STB_COMPUTE_SUBMESH Compute Sub-mesh @@ -3996,6 +4000,10 @@ Use Display Entity menu command to show them. TOP_COMPUTE Compute + + TOP_RE_COMPUTE + Clear + Compute + TOP_COMPUTE_SUBMESH Compute Sub-mesh diff --git a/src/SMESH_I/SMESH_Gen_i_1.cxx b/src/SMESH_I/SMESH_Gen_i_1.cxx index e4e3f5e85..413ef37f9 100644 --- a/src/SMESH_I/SMESH_Gen_i_1.cxx +++ b/src/SMESH_I/SMESH_Gen_i_1.cxx @@ -282,10 +282,10 @@ GEOM::GEOM_Object_ptr SMESH_Gen_i::GetGeomObjectByEntry( const std::string& entr //======================================================================= SALOMEDS::SObject_ptr SMESH_Gen_i::publish(CORBA::Object_ptr theIOR, - SALOMEDS::SObject_ptr theFatherObject, - const int theTag, - const char* thePixMap, - const bool theSelectable) + SALOMEDS::SObject_ptr theFatherObject, + const int theTag, + const char* thePixMap, + const bool theSelectable) { SALOMEDS::Study_var theStudy = getStudyServant(); SALOMEDS::SObject_wrap SO = ObjectToSObject( theIOR ); -- 2.30.2