mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 10:10:33 +05:00
Bug PAL7334
DEVELOPMENT : Control Improvement
This commit is contained in:
parent
586a2465d0
commit
81b2a4c986
@ -131,7 +131,7 @@
|
||||
<!-- ********************************* Settings (menubar) ********************************* -->
|
||||
<menu-item label-id="Preferences" item-id="4" pos-id="">
|
||||
<submenu label-id="Mesh" item-id="100" pos-id="-1">
|
||||
<submenu label-id="Display Mode" item-id="1000" pos-id="">
|
||||
<submenu label-id="Display Mode" item-id="1000" pos-id="">
|
||||
<popup-item item-id="10001" pos-id="" label-id="Wireframe" icon-id="mesh_wireframe.png" tooltip-id="" accel-id="" toggle-id="false" execute-action=""/>
|
||||
<popup-item item-id="10002" pos-id="" label-id="Shading" icon-id="mesh_shading.png" tooltip-id="" accel-id="" toggle-id="true" execute-action=""/>
|
||||
<popup-item item-id="10004" pos-id="" label-id="Nodes" icon-id="mesh_points.png" tooltip-id="" accel-id="" toggle-id="false" execute-action=""/>
|
||||
@ -147,7 +147,11 @@
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="1006" pos-id="" label-id="Selection" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="1007" pos-id="" label-id="Quality controls" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<submenu label-id="Quality controls" item-id="1007" pos-id="">
|
||||
<popup-item item-id="10070" pos-id="" label-id="Precision" icon-id="" tooltip-id="" accel-id="" toggle-id="false" execute-action=""/>
|
||||
<popup-item item-id="10071" pos-id="" label-id="Display Entity" icon-id="" tooltip-id="" accel-id="" toggle-id="true" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<separator pos-id="-1"/>
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user