From: apo Date: Mon, 27 Dec 2004 14:02:40 +0000 (+0000) Subject: Bug PAL7334 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=81b2a4c986bdaabded49bfa60fe7a2d96d2e6f34;p=modules%2Fsmesh.git Bug PAL7334 DEVELOPMENT : Control Improvement --- diff --git a/resources/SMESH_en.xml b/resources/SMESH_en.xml index 2913c8574..387e3ac8c 100644 --- a/resources/SMESH_en.xml +++ b/resources/SMESH_en.xml @@ -131,7 +131,7 @@ - + @@ -147,7 +147,11 @@ - + + + + + diff --git a/src/OBJECT/SMESH_Actor.cxx b/src/OBJECT/SMESH_Actor.cxx index 41b7668f2..9bd62817c 100644 --- a/src/OBJECT/SMESH_Actor.cxx +++ b/src/OBJECT/SMESH_Actor.cxx @@ -736,7 +736,20 @@ void SMESH_ActorDef::SetControlMode(eControl theMode){ myControlActor->SetControlMode(aFunctor,myScalarBarActor,myLookupTable); } } + + if(QAD_CONFIG->getSetting("SMESH:DispayEntity") == "true"){ + if(myControlActor == my1DActor) + myEntityMode = eEdges; + else if(myControlActor == my2DActor) + myEntityMode = eFaces; + else if(myControlActor == my3DActor) + myEntityMode = eVolumes; + } + + }else if(QAD_CONFIG->getSetting("SMESH:DispayEntity") == "true"){ + myEntityMode = eAllEntity; } + SetRepresentation(GetRepresentation()); myTimeStamp->Modified(); @@ -1011,18 +1024,18 @@ void SMESH_ActorDef::SetVisibility(int theMode, bool theIsUpdateRepersentation){ if(theIsUpdateRepersentation) SetRepresentation(GetRepresentation()); - switch(myControlMode){ - case eNone: - break; - case eFreeEdges: - case eFreeBorders: - my1DExtActor->VisibilityOn(); - break; - case eLength2D: - my1DExtActor->VisibilityOn(); - default: - if(myControlActor->GetUnstructuredGrid()->GetNumberOfCells()) - myScalarBarActor->VisibilityOn(); + if(myControlMode != eNone){ + switch(myControlMode){ + case eFreeEdges: + case eFreeBorders: + my1DExtActor->VisibilityOn(); + break; + case eLength2D: + my1DExtActor->VisibilityOn(); + default: + if(myControlActor->GetUnstructuredGrid()->GetNumberOfCells()) + myScalarBarActor->VisibilityOn(); + } } if(myRepresentation != ePoint) @@ -1037,8 +1050,11 @@ void SMESH_ActorDef::SetVisibility(int theMode, bool theIsUpdateRepersentation){ if(myEntityMode & eVolumes) my3DActor->VisibilityOn(); - if(myIsPointsLabeled) myPointLabels->VisibilityOn(); - if(myIsCellsLabeled) myCellsLabels->VisibilityOn(); + if(myIsPointsLabeled) + myPointLabels->VisibilityOn(); + + if(myIsCellsLabeled) + myCellsLabels->VisibilityOn(); } Modified(); diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index f407960d4..453dda9b9 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -1662,12 +1662,23 @@ bool SMESHGUI::OnGUIEvent(int theCommandID, QAD_Desktop * parent) break; } - case 1007: + case 10070: { ( new SMESHGUI_PrecisionDlg( parent ) )->exec(); break; } + case 10071: + { + parent->menuBar()->setItemChecked(10071, !parent->menuBar()->isItemChecked(10071)); + if (parent->menuBar()->isItemChecked(10071)) { + QAD_CONFIG->addSetting("SMESH:DispayEntity","true"); + } + else { + QAD_CONFIG->addSetting("SMESH:DispayEntity","false"); + } + break; + } case 1006: { SMESHGUI_Preferences_SelectionDlg* aDlg = @@ -2254,6 +2265,12 @@ bool SMESHGUI::SetSettings(QAD_Desktop * parent) myAutomaticUpdate = false; } + QString anIsDisplayEntity = QAD_CONFIG->getSetting("SMESH:DispayEntity"); + if(anIsDisplayEntity.compare("true") == 0) + parent->menuBar()->setItemChecked(10071,true); + else + parent->menuBar()->setItemChecked(10071,false); + /* Selection */ SMESH::UpdateSelectionProp();