mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5377 Deeper : Add preference for visibility of faults when creating a new view
This commit is contained in:
parent
26a96f8e41
commit
4b04e58607
@ -237,6 +237,9 @@ RiaPreferences::RiaPreferences( void )
|
||||
CAF_PDM_InitField( &m_showLegendBackground, "showLegendBackground", true, "Show Box around Legends", "", "", "" );
|
||||
m_showLegendBackground.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||
|
||||
CAF_PDM_InitField( &m_enableFaultsByDefault, "enableFaultsByDefault", true, "Enable Faults By Default", "", "", "" );
|
||||
m_enableFaultsByDefault.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &lastUsedProjectFileName, "lastUsedProjectFileName", "Last Used Project File", "", "", "" );
|
||||
lastUsedProjectFileName.uiCapability()->setUiHidden( true );
|
||||
|
||||
@ -435,7 +438,8 @@ void RiaPreferences::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
field == &showLasCurveWithoutTvdWarning || field == &holoLensDisableCertificateVerification ||
|
||||
field == &m_showProjectChangedDialog || field == &m_searchPlotTemplateFoldersRecursively ||
|
||||
field == &m_showLegendBackground || field == &m_showSummaryTimeAsLongString ||
|
||||
field == &m_showViewIdInProjectTree || field == &m_useMultipleThreadsWhenLoadingSummaryData )
|
||||
field == &m_showViewIdInProjectTree || field == &m_useMultipleThreadsWhenLoadingSummaryData ||
|
||||
field == &m_enableFaultsByDefault )
|
||||
{
|
||||
caf::PdmUiCheckBoxEditorAttribute* myAttr = dynamic_cast<caf::PdmUiCheckBoxEditorAttribute*>( attribute );
|
||||
if ( myAttr )
|
||||
@ -483,6 +487,7 @@ void RiaPreferences::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering&
|
||||
viewsGroup->add( &m_navigationPolicy );
|
||||
viewsGroup->add( &m_defaultScaleFactorZ );
|
||||
viewsGroup->add( &m_showLegendBackground );
|
||||
viewsGroup->add( &m_enableFaultsByDefault );
|
||||
|
||||
caf::PdmUiGroup* otherGroup = uiOrdering.addNewGroup( "Other" );
|
||||
otherGroup->add( &ssihubAddress );
|
||||
@ -1027,3 +1032,11 @@ bool RiaPreferences::showLegendBackground() const
|
||||
{
|
||||
return m_showLegendBackground();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaPreferences::enableFaultsByDefault() const
|
||||
{
|
||||
return m_enableFaultsByDefault;
|
||||
}
|
||||
|
@ -71,6 +71,8 @@ public:
|
||||
typedef caf::AppEnum<QPageSize::PageSizeId> PageSizeEnum;
|
||||
typedef caf::AppEnum<QPageLayout::Orientation> PageOrientationEnum;
|
||||
|
||||
bool enableFaultsByDefault() const;
|
||||
|
||||
public:
|
||||
RiaPreferences( void );
|
||||
~RiaPreferences( void ) override;
|
||||
@ -212,6 +214,7 @@ private:
|
||||
caf::PdmField<caf::AppEnum<RiaGuiApplication::RINavigationPolicy>> m_navigationPolicy;
|
||||
caf::PdmField<int> m_defaultScaleFactorZ;
|
||||
caf::PdmField<bool> m_showLegendBackground;
|
||||
caf::PdmField<bool> m_enableFaultsByDefault;
|
||||
|
||||
QStringList m_tabNames;
|
||||
|
||||
|
@ -48,6 +48,7 @@
|
||||
#include "RimEclipsePropertyFilterCollection.h"
|
||||
#include "RimEclipseStatisticsCase.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimFaultInViewCollection.h"
|
||||
#include "RimFormationNames.h"
|
||||
#include "RimGridCollection.h"
|
||||
#include "RimIntersectionCollection.h"
|
||||
@ -288,11 +289,14 @@ RimEclipseView* RimEclipseCase::createAndAddReservoirView()
|
||||
{
|
||||
rimEclipseView->cellResult()->setResultType( RiaDefines::DYNAMIC_NATIVE );
|
||||
|
||||
if ( RiaApplication::instance()->preferences()->loadAndShowSoil )
|
||||
auto prefs = RiaApplication::instance()->preferences();
|
||||
if ( prefs->loadAndShowSoil )
|
||||
{
|
||||
rimEclipseView->cellResult()->setResultVariable( "SOIL" );
|
||||
}
|
||||
|
||||
rimEclipseView->faultCollection()->showFaultCollection = prefs->enableFaultsByDefault();
|
||||
|
||||
rimEclipseView->hasUserRequestedAnimation = true;
|
||||
|
||||
rimEclipseView->cellEdgeResult()->setResultVariable( "MULT" );
|
||||
|
Loading…
Reference in New Issue
Block a user