mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4982 Preferences : Move Use Shaders to development tab
This commit is contained in:
parent
be1781fd3b
commit
2aa704b18a
@ -539,7 +539,7 @@ RimViewWindow* RiaGuiApplication::activePlotWindow() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaGuiApplication::useShaders() const
|
||||
{
|
||||
if ( !m_preferences->useShaders ) return false;
|
||||
if ( !m_preferences->useShaders() ) return false;
|
||||
|
||||
bool isShadersSupported = caf::Viewer::isShadersSupported();
|
||||
if ( !isShadersSupported ) return false;
|
||||
|
@ -177,8 +177,8 @@ RiaPreferences::RiaPreferences( void )
|
||||
"" );
|
||||
showLasCurveWithoutTvdWarning.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||
|
||||
CAF_PDM_InitField( &useShaders, "useShaders", true, "Use Shaders", "", "", "" );
|
||||
useShaders.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||
CAF_PDM_InitField( &m_useShaders, "useShaders", true, "Use Shaders", "", "", "" );
|
||||
m_useShaders.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||
CAF_PDM_InitField( &showHud, "showHud", false, "Show 3D Information", "", "", "" );
|
||||
showHud.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||
CAF_PDM_InitField( &m_appendClassNameToUiText, "appendClassNameToUiText", false, "Show Class Names", "", "", "" );
|
||||
@ -360,7 +360,7 @@ void RiaPreferences::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
}
|
||||
|
||||
if ( field == &octaveShowHeaderInfoWhenExecutingScripts || field == &autocomputeDepthRelatedProperties ||
|
||||
field == &loadAndShowSoil || field == &useShaders || field == &showHud || field == &m_appendClassNameToUiText ||
|
||||
field == &loadAndShowSoil || field == &m_useShaders || field == &showHud || field == &m_appendClassNameToUiText ||
|
||||
field == &m_appendFieldKeywordToToolTipText || field == &m_showTestToolbar ||
|
||||
field == &m_includeFractureDebugInfoFile || field == &showLasCurveWithoutTvdWarning ||
|
||||
field == &holoLensDisableCertificateVerification || field == &m_showProjectChangedDialog ||
|
||||
@ -413,7 +413,6 @@ void RiaPreferences::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering&
|
||||
viewsGroup->add( &navigationPolicy );
|
||||
viewsGroup->add( &defaultScaleFactorZ );
|
||||
viewsGroup->add( &showLegendBackground );
|
||||
viewsGroup->add( &useShaders );
|
||||
viewsGroup->add( &showHud );
|
||||
|
||||
caf::PdmUiGroup* otherGroup = uiOrdering.addNewGroup( "Other" );
|
||||
@ -491,6 +490,8 @@ void RiaPreferences::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering&
|
||||
uiOrdering.add( &m_showTestToolbar );
|
||||
uiOrdering.add( &m_includeFractureDebugInfoFile );
|
||||
uiOrdering.add( &m_holoLensExportFolder );
|
||||
|
||||
uiOrdering.add( &m_useShaders );
|
||||
}
|
||||
|
||||
uiOrdering.skipRemainingFields( true );
|
||||
@ -702,6 +703,19 @@ QString RiaPreferences::holoLensExportFolder() const
|
||||
return m_holoLensExportFolder();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaPreferences::useShaders() const
|
||||
{
|
||||
if ( !RiaApplication::enableDevelopmentFeatures() )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return m_useShaders();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -35,10 +35,15 @@
|
||||
// Include to make Pdm work for cvf::Color
|
||||
#include "cafPdmFieldCvfColor.h"
|
||||
|
||||
#include <QStringList>
|
||||
|
||||
#include <map>
|
||||
|
||||
class RifReaderSettings;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
class RiaPreferences : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
@ -76,6 +81,7 @@ public:
|
||||
bool includeFractureDebugInfoFile() const;
|
||||
bool showProjectChangedDialog() const;
|
||||
QString holoLensExportFolder() const;
|
||||
bool useShaders() const;
|
||||
|
||||
const QString& dateFormat() const;
|
||||
const QString& timeFormat() const;
|
||||
@ -124,7 +130,6 @@ public: // Pdm Fields
|
||||
|
||||
caf::PdmField<bool> showLegendBackground;
|
||||
|
||||
caf::PdmField<bool> useShaders;
|
||||
caf::PdmField<bool> showHud;
|
||||
|
||||
caf::PdmField<QString> lastUsedProjectFileName;
|
||||
@ -165,6 +170,7 @@ private:
|
||||
caf::PdmField<bool> m_appendClassNameToUiText;
|
||||
caf::PdmField<bool> m_appendFieldKeywordToToolTipText;
|
||||
caf::PdmField<bool> m_showViewIdInProjectTree;
|
||||
caf::PdmField<bool> m_useShaders;
|
||||
|
||||
caf::PdmField<bool> m_showProjectChangedDialog;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user