Renaming in the aftermath of the MDI window control refactorization. Aligned fieldChangedByUi in that respact as well.

This commit is contained in:
Jacob Støren
2017-01-20 11:38:18 +01:00
parent a1aec0b5e0
commit c025c2a3d7
16 changed files with 82 additions and 101 deletions

View File

@@ -53,7 +53,7 @@ RimWellAllocationPlot::RimWellAllocationPlot()
m_accumulatedWellFlowPlot.uiCapability()->setUiHidden(true);
m_accumulatedWellFlowPlot = new RimWellLogPlot;
this->setAsPlotMDI();
this->setAsPlotMdiWindow();
}
//--------------------------------------------------------------------------------------------------
@@ -61,7 +61,7 @@ RimWellAllocationPlot::RimWellAllocationPlot()
//--------------------------------------------------------------------------------------------------
RimWellAllocationPlot::~RimWellAllocationPlot()
{
removeWidgetFromMDI();
removeMdiWindowFromMdiArea();
delete m_accumulatedWellFlowPlot();
@@ -198,14 +198,21 @@ void RimWellAllocationPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedF
{
if (changedField == &m_showWindow)
{
updateViewerWidgetBasic();
if (m_showWindow)
{
loadDataAndUpdate();
}
else
{
updateMdiWindowVisibility();
}
uiCapability()->updateUiIconFromToggleField();
}
else if (changedField == &m_userName ||
changedField == &m_showPlotTitle)
{
updateViewerWidgetWindowTitle();
updateMdiWindowTitle();
}
else if (changedField == &m_simulationWell)
{
@@ -232,7 +239,7 @@ QImage RimWellAllocationPlot::snapshotWindowContent()
void RimWellAllocationPlot::setDescription(const QString& description)
{
m_userName = description;
this->updateViewerWidgetWindowTitle();
this->updateMdiWindowTitle();
}
//--------------------------------------------------------------------------------------------------
@@ -248,7 +255,7 @@ QString RimWellAllocationPlot::description() const
//--------------------------------------------------------------------------------------------------
void RimWellAllocationPlot::loadDataAndUpdate()
{
updateViewerWidgetBasic();
updateMdiWindowVisibility();
updateFromWell();
}