mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-04-12 12:47:28 +05:00
Bug PAL7334
DEVELOPMENT : Control Improvement
This commit is contained in:
parent
586a2465d0
commit
81b2a4c986
@ -131,7 +131,7 @@
|
|||||||
<!-- ********************************* Settings (menubar) ********************************* -->
|
<!-- ********************************* Settings (menubar) ********************************* -->
|
||||||
<menu-item label-id="Preferences" item-id="4" pos-id="">
|
<menu-item label-id="Preferences" item-id="4" pos-id="">
|
||||||
<submenu label-id="Mesh" item-id="100" pos-id="-1">
|
<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="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="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=""/>
|
<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=""/>
|
<separator pos-id=""/>
|
||||||
<popup-item item-id="1006" pos-id="" label-id="Selection" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
<popup-item item-id="1006" pos-id="" label-id="Selection" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||||
<separator pos-id=""/>
|
<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>
|
</submenu>
|
||||||
<endsubmenu />
|
<endsubmenu />
|
||||||
<separator pos-id="-1"/>
|
<separator pos-id="-1"/>
|
||||||
|
@ -736,7 +736,20 @@ void SMESH_ActorDef::SetControlMode(eControl theMode){
|
|||||||
myControlActor->SetControlMode(aFunctor,myScalarBarActor,myLookupTable);
|
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());
|
SetRepresentation(GetRepresentation());
|
||||||
|
|
||||||
myTimeStamp->Modified();
|
myTimeStamp->Modified();
|
||||||
@ -1011,18 +1024,18 @@ void SMESH_ActorDef::SetVisibility(int theMode, bool theIsUpdateRepersentation){
|
|||||||
if(theIsUpdateRepersentation)
|
if(theIsUpdateRepersentation)
|
||||||
SetRepresentation(GetRepresentation());
|
SetRepresentation(GetRepresentation());
|
||||||
|
|
||||||
switch(myControlMode){
|
if(myControlMode != eNone){
|
||||||
case eNone:
|
switch(myControlMode){
|
||||||
break;
|
case eFreeEdges:
|
||||||
case eFreeEdges:
|
case eFreeBorders:
|
||||||
case eFreeBorders:
|
my1DExtActor->VisibilityOn();
|
||||||
my1DExtActor->VisibilityOn();
|
break;
|
||||||
break;
|
case eLength2D:
|
||||||
case eLength2D:
|
my1DExtActor->VisibilityOn();
|
||||||
my1DExtActor->VisibilityOn();
|
default:
|
||||||
default:
|
if(myControlActor->GetUnstructuredGrid()->GetNumberOfCells())
|
||||||
if(myControlActor->GetUnstructuredGrid()->GetNumberOfCells())
|
myScalarBarActor->VisibilityOn();
|
||||||
myScalarBarActor->VisibilityOn();
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(myRepresentation != ePoint)
|
if(myRepresentation != ePoint)
|
||||||
@ -1037,8 +1050,11 @@ void SMESH_ActorDef::SetVisibility(int theMode, bool theIsUpdateRepersentation){
|
|||||||
if(myEntityMode & eVolumes)
|
if(myEntityMode & eVolumes)
|
||||||
my3DActor->VisibilityOn();
|
my3DActor->VisibilityOn();
|
||||||
|
|
||||||
if(myIsPointsLabeled) myPointLabels->VisibilityOn();
|
if(myIsPointsLabeled)
|
||||||
if(myIsCellsLabeled) myCellsLabels->VisibilityOn();
|
myPointLabels->VisibilityOn();
|
||||||
|
|
||||||
|
if(myIsCellsLabeled)
|
||||||
|
myCellsLabels->VisibilityOn();
|
||||||
}
|
}
|
||||||
|
|
||||||
Modified();
|
Modified();
|
||||||
|
@ -1662,12 +1662,23 @@ bool SMESHGUI::OnGUIEvent(int theCommandID, QAD_Desktop * parent)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 1007:
|
case 10070:
|
||||||
{
|
{
|
||||||
( new SMESHGUI_PrecisionDlg( parent ) )->exec();
|
( new SMESHGUI_PrecisionDlg( parent ) )->exec();
|
||||||
break;
|
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:
|
case 1006:
|
||||||
{
|
{
|
||||||
SMESHGUI_Preferences_SelectionDlg* aDlg =
|
SMESHGUI_Preferences_SelectionDlg* aDlg =
|
||||||
@ -2254,6 +2265,12 @@ bool SMESHGUI::SetSettings(QAD_Desktop * parent)
|
|||||||
myAutomaticUpdate = false;
|
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 */
|
/* Selection */
|
||||||
SMESH::UpdateSelectionProp();
|
SMESH::UpdateSelectionProp();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user