.. _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.
* :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.
<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"/>
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") );
if (!aStudy)
return OK;
+ SUIT_ResourceMgr* resMgr;
{
OK = true;
vtkRenderer *aRenderer = aViewWnd->getRenderer();
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);
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;
}
}
</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>