Added display of class names to preferences

Use flag in pdmUiTreeViewEditor to control display of class names
This commit is contained in:
Magne Sjaastad
2015-09-18 19:24:02 +02:00
parent dcf9ac9b50
commit a4b57a11a4
8 changed files with 46 additions and 10 deletions

View File

@@ -88,6 +88,7 @@
#include "RimMainPlotCollection.h"
#include "RimWellLogPlotCollection.h"
#include "RimWellLogPlot.h"
#include "cafPdmUiTreeView.h"
namespace caf
{
@@ -1364,12 +1365,16 @@ void RiaApplication::applyPreferences()
caf::EffectGenerator::setRenderingMode(caf::EffectGenerator::FIXED_FUNCTION);
}
if (RiuMainWindow::instance() && RiuMainWindow::instance()->projectTreeView())
{
RiuMainWindow::instance()->projectTreeView()->enableAppendOfClassNameToUiItemText(m_preferences->appendClassNameToUiText());
}
if (this->project())
{
this->project()->setScriptDirectories(m_preferences->scriptDirectories());
this->project()->scriptCollection()->updateConnectedEditors();
this->project()->updateConnectedEditors();
}
}
//--------------------------------------------------------------------------------------------------

View File

@@ -62,6 +62,7 @@ RiaPreferences::RiaPreferences(void)
CAF_PDM_InitField(&useShaders, "useShaders", true, "Use Shaders", "", "", "");
CAF_PDM_InitField(&showHud, "showHud", false, "Show 3D Information", "", "", "");
CAF_PDM_InitField(&appendClassNameToUiText, "appendClassNameToUiText", false, "[System] Show Class Names", "", "", "");
CAF_PDM_InitFieldNoDefault(&lastUsedProjectFileName,"lastUsedProjectFileName", "Last Used Project File", "", "", "");
lastUsedProjectFileName.uiCapability()->setUiHidden(true);

View File

@@ -62,6 +62,7 @@ public: // Pdm Fields
caf::PdmField<bool> useShaders;
caf::PdmField<bool> showHud;
caf::PdmField<bool> appendClassNameToUiText;
caf::PdmField<QString> lastUsedProjectFileName;