mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-25 08:50:35 +05:00
23615: EDF 17317 - Fit All when display one mesh
This commit is contained in:
parent
48b83422af
commit
60beecbdbd
Binary file not shown.
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 92 KiB |
@ -22,7 +22,9 @@ General Preferences
|
||||
|
||||
.. _display_mode_pref:
|
||||
|
||||
* **Display mode**
|
||||
* **Display**
|
||||
|
||||
* **Fit All upon Show Only** - if activated, *Show Only* command additionally performs *Fit All* command.
|
||||
|
||||
* **Default display mode** - allows to set Wireframe, Shading, Nodes or Shrink :ref:`presentation mode <display_mode_page>` as default.
|
||||
|
||||
|
@ -47,8 +47,8 @@ right-clicking on the selected mesh.
|
||||
* :ref:`Transparency <transparency_page>` - allows to change the transparency of mesh elements.
|
||||
* :ref:`Controls <quality_page>` - graphically presents various information about the mesh.
|
||||
* **Hide** - allows to hide the selected mesh from the viewer.
|
||||
* **Show Only** - allows to display only the selected mesh, hiding all others from the viewer.
|
||||
* :ref:`Clipping <clipping_page>` - allows to create cross-sections of the displayed objects.
|
||||
* **Show Only** - allows to display only the selected mesh, hiding all others from the viewer. If :ref:`Fit All upon Show Only <display_mode_pref>` Preference option is active, *Fit All* command is additionally performed.
|
||||
* :doc:`clipping` - allows to create cross-sections of the displayed objects.
|
||||
* **Dump view** - exports an object from the viewer in bmp, png or jpeg image format.
|
||||
* **Change background** - allows to redefine the background color. By default it is black.
|
||||
* **View Operations** - allows to show/hide the visualization toolbar in the Viewer window.
|
||||
|
@ -84,6 +84,7 @@
|
||||
<parameter name="update_limit" value="500000" />
|
||||
<parameter name="display_entity" value="true" />
|
||||
<parameter name="display_mode" value="1" />
|
||||
<parameter name="fitall_on_displayonly" value="1" />
|
||||
<parameter name="auto_groups" value="false"/>
|
||||
<parameter name="show_warning" value="true"/>
|
||||
<parameter name="show_result_notification" value="2"/>
|
||||
|
@ -5086,6 +5086,9 @@ void SMESHGUI::createPreferences()
|
||||
|
||||
int dispgroup = addPreference( tr( "PREF_DISPLAY_MODE_GROUP" ), genTab );
|
||||
setPreferenceProperty( dispgroup, "columns", 2 );
|
||||
|
||||
addPreference( tr( "PREF_FITALL_ON_DISPLAYONLY" ), dispgroup, LightApp_Preferences::Bool, "SMESH", "fitall_on_displayonly" );
|
||||
|
||||
int dispmode = addPreference( tr( "PREF_DISPLAY_MODE" ), dispgroup, LightApp_Preferences::Selector, "SMESH", "display_mode" );
|
||||
QStringList modes;
|
||||
modes.append( tr("MEN_WIRE") );
|
||||
|
@ -677,6 +677,7 @@ namespace SMESH
|
||||
if (!aStudy)
|
||||
return OK;
|
||||
|
||||
SUIT_ResourceMgr* resMgr;
|
||||
{
|
||||
OK = true;
|
||||
vtkRenderer *aRenderer = aViewWnd->getRenderer();
|
||||
@ -722,6 +723,10 @@ namespace SMESH
|
||||
anActor->SetVisibility(true);
|
||||
if (theAction == eDisplayOnly) aRenderer->ResetCameraClippingRange();
|
||||
aStudy->setVisibilityState(theEntry, Qtx::ShownState);
|
||||
if (( theAction == eDisplayOnly ) &&
|
||||
( resMgr = SMESHGUI::resourceMgr() ) &&
|
||||
( resMgr->booleanValue( "SMESH", "fitall_on_displayonly", false )))
|
||||
FitAll(); // PAL23615
|
||||
break;
|
||||
case eErase:
|
||||
//MESSAGE("--- erase " << anActor);
|
||||
@ -746,8 +751,16 @@ namespace SMESH
|
||||
anActor->SetVisibility(true);
|
||||
aStudy->setVisibilityState(theEntry, Qtx::ShownState);
|
||||
// FitAll(); - PAL16770(Display of a group performs an automatic fit all)
|
||||
if (needFitAll) FitAll();
|
||||
} else {
|
||||
if (( !needFitAll ) &&
|
||||
( theAction == eDisplayOnly ) &&
|
||||
( resMgr = SMESHGUI::resourceMgr() ))
|
||||
{
|
||||
needFitAll = resMgr->booleanValue( "SMESH", "fitall_on_displayonly", false );
|
||||
}
|
||||
if ( needFitAll )
|
||||
FitAll();
|
||||
}
|
||||
else {
|
||||
OK = false;
|
||||
}
|
||||
}
|
||||
|
@ -4733,12 +4733,16 @@ Please, create VTK viewer and try again</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>PREF_DISPLAY_MODE_GROUP</source>
|
||||
<translation>Display mode</translation>
|
||||
<translation>Display</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>PREF_DISPLAY_MODE</source>
|
||||
<translation>Default display mode</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>PREF_FITALL_ON_DISPLAYONLY</source>
|
||||
<translation>Fit All upon Show Only</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>PREF_ELEMENTS</source>
|
||||
<translation>Elements</translation>
|
||||
|
Loading…
Reference in New Issue
Block a user