mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2535 Use the MainWindowTools class instead of MainWindow directly (part 1)
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
#include "RimProject.h"
|
||||
#include "RimFlowCharacteristicsPlot.h"
|
||||
|
||||
#include "RiuMainPlotWindow.h"
|
||||
#include "RiuPlotMainWindowTools.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
@@ -79,12 +79,10 @@ void RicAddStoredFlowCharacteristicsPlotFeature::onActionTriggered(bool isChecke
|
||||
|
||||
flowPlotColl->updateConnectedEditors();
|
||||
|
||||
RiuMainPlotWindow* mainPlotWindow = RiaApplication::instance()->mainPlotWindow();
|
||||
if (mainPlotWindow)
|
||||
{
|
||||
mainPlotWindow->selectAsCurrentItem(flowCharacteristicsPlot);
|
||||
mainPlotWindow->setExpanded(flowCharacteristicsPlot);
|
||||
}
|
||||
RiuPlotMainWindowTools::showPlotMainWindow();
|
||||
|
||||
RiuPlotMainWindowTools::selectAsCurrentItem(flowCharacteristicsPlot);
|
||||
RiuPlotMainWindowTools::setExpanded(flowCharacteristicsPlot);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "RimProject.h"
|
||||
#include "RimWellAllocationPlot.h"
|
||||
|
||||
#include "RiuMainPlotWindow.h"
|
||||
#include "RiuPlotMainWindowTools.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
@@ -79,12 +79,8 @@ void RicAddStoredWellAllocationPlotFeature::onActionTriggered(bool isChecked)
|
||||
|
||||
flowPlotColl->updateConnectedEditors();
|
||||
|
||||
RiuMainPlotWindow* mainPlotWindow = RiaApplication::instance()->mainPlotWindow();
|
||||
if (mainPlotWindow)
|
||||
{
|
||||
mainPlotWindow->selectAsCurrentItem(wellAllocationPlot);
|
||||
mainPlotWindow->setExpanded(wellAllocationPlot);
|
||||
}
|
||||
RiuPlotMainWindowTools::selectAsCurrentItem(wellAllocationPlot);
|
||||
RiuPlotMainWindowTools::setExpanded(wellAllocationPlot);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
#include "RiaSummaryTools.h"
|
||||
|
||||
#include "RiuMainPlotWindow.h"
|
||||
#include "RiuMainWindow.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "RimProject.h"
|
||||
#include "Rim3dView.h"
|
||||
|
||||
#include "RiuMainPlotWindow.h"
|
||||
#include "RiuPlotMainWindowTools.h"
|
||||
|
||||
#include <QAction>
|
||||
|
||||
@@ -91,13 +91,13 @@ void RicShowFlowCharacteristicsPlotFeature::onActionTriggered(bool isChecked)
|
||||
RimFlowPlotCollection* flowPlotColl = RiaApplication::instance()->project()->mainPlotCollection->flowPlotCollection();
|
||||
if (flowPlotColl)
|
||||
{
|
||||
RiuMainPlotWindow* plotwindow = RiaApplication::instance()->getOrCreateAndShowMainPlotWindow();
|
||||
RiuPlotMainWindowTools::showPlotMainWindow();
|
||||
|
||||
flowPlotColl->defaultFlowCharacteristicsPlot()->setFromFlowSolution(eclCase->defaultFlowDiagSolution());
|
||||
flowPlotColl->defaultFlowCharacteristicsPlot()->updateConnectedEditors();
|
||||
|
||||
// Make sure the summary plot window is created and visible
|
||||
plotwindow->selectAsCurrentItem(flowPlotColl->defaultFlowCharacteristicsPlot());
|
||||
RiuPlotMainWindowTools::selectAsCurrentItem(flowPlotColl->defaultFlowCharacteristicsPlot());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "Rim3dView.h"
|
||||
#include "RimWellAllocationPlot.h"
|
||||
|
||||
#include "RiuMainPlotWindow.h"
|
||||
#include "RiuPlotMainWindowTools.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
@@ -110,8 +110,8 @@ void RicShowWellAllocationPlotFeature::onActionTriggered(bool isChecked)
|
||||
flowPlotColl->defaultWellAllocPlot()->updateConnectedEditors();
|
||||
|
||||
// Make sure the summary plot window is created and visible
|
||||
RiuMainPlotWindow* plotwindow = RiaApplication::instance()->getOrCreateAndShowMainPlotWindow();
|
||||
plotwindow->selectAsCurrentItem(flowPlotColl->defaultWellAllocPlot());
|
||||
RiuPlotMainWindowTools::showPlotMainWindow();
|
||||
RiuPlotMainWindowTools::selectAsCurrentItem(flowPlotColl->defaultWellAllocPlot());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user