#1107 Moved showWindow field to RimViewWindow and removed showWindow field from derived classes

This commit is contained in:
Magne Sjaastad
2017-01-20 16:25:05 +01:00
parent 94f94af325
commit cebe5428be
15 changed files with 74 additions and 205 deletions

View File

@@ -40,8 +40,6 @@ CAF_PDM_SOURCE_INIT(RimWellAllocationPlot, "WellAllocationPlot");
RimWellAllocationPlot::RimWellAllocationPlot()
{
CAF_PDM_InitObject("Well Allocation Plot", ":/newIcon16x16.png", "", "");
CAF_PDM_InitField(&m_showWindow, "ShowWindow", true, "Show Flow Diagnostics Plot", "", "", "");
m_showWindow.uiCapability()->setUiHidden(true);
CAF_PDM_InitField(&m_userName, "PlotDescription", QString("Flow Diagnostics Plot"), "Name", "", "", "");
m_userName.uiCapability()->setUiReadOnly(true);
@@ -196,20 +194,9 @@ QList<caf::PdmOptionItemInfo> RimWellAllocationPlot::calculateValueOptions(const
//--------------------------------------------------------------------------------------------------
void RimWellAllocationPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
{
if (changedField == &m_showWindow)
{
if (m_showWindow)
{
loadDataAndUpdate();
}
else
{
updateMdiWindowVisibility();
}
RimViewWindow::fieldChangedByUi(changedField, oldValue, newValue);
uiCapability()->updateUiIconFromToggleField();
}
else if (changedField == &m_userName ||
if (changedField == &m_userName ||
changedField == &m_showPlotTitle)
{
updateMdiWindowTitle();