Disable multiplot functionality

This commit is contained in:
Gaute Lindkvist 2019-11-20 15:00:25 +01:00
parent d079f233a4
commit 1d4d261129
9 changed files with 3 additions and 101 deletions

View File

@ -311,7 +311,6 @@ void RiaGuiApplication::loadAndUpdatePlotData()
RimPltPlotCollection* pltColl = nullptr;
RimGridCrossPlotCollection* gcpColl = nullptr;
RimSaturationPressurePlotCollection* sppColl = nullptr;
RimGridPlotWindowCollection* gpwColl = nullptr;
if ( m_project->mainPlotCollection() )
{
@ -347,10 +346,6 @@ void RiaGuiApplication::loadAndUpdatePlotData()
{
sppColl = m_project->mainPlotCollection()->saturationPressurePlotCollection();
}
if ( m_project->mainPlotCollection()->combinationPlotCollection() )
{
gpwColl = m_project->mainPlotCollection()->combinationPlotCollection();
}
}
size_t plotCount = 0;
@ -362,7 +357,6 @@ void RiaGuiApplication::loadAndUpdatePlotData()
plotCount += pltColl ? pltColl->pltPlots().size() : 0;
plotCount += gcpColl ? gcpColl->gridCrossPlots().size() : 0;
plotCount += sppColl ? sppColl->plots().size() : 0;
plotCount += gpwColl ? gpwColl->gridPlotWindows().size() : 0;
if ( plotCount > 0 )
{
@ -436,15 +430,6 @@ void RiaGuiApplication::loadAndUpdatePlotData()
plotProgress.incrementProgress();
}
}
if ( gpwColl )
{
for ( const auto& gridPlotWindow : gpwColl->gridPlotWindows() )
{
gridPlotWindow->loadDataAndUpdate();
plotProgress.incrementProgress();
}
}
}
}

View File

@ -50,30 +50,6 @@ RicNewGridPlotWindowFeature::RicNewGridPlotWindowFeature()
//--------------------------------------------------------------------------------------------------
RicfCommandResponse RicNewGridPlotWindowFeature::execute()
{
RimProject* project = RiaApplication::instance()->project();
RimGridPlotWindowCollection* plotCollection = project->mainPlotCollection()->combinationPlotCollection();
RimGridPlotWindow* plotWindow = new RimGridPlotWindow;
plotWindow->setDescription( QString( "Combination Plot %1" ).arg( plotCollection->gridPlotWindows().size() + 1 ) );
plotWindow->setAsPlotMdiWindow();
plotCollection->addGridPlotWindow( plotWindow );
if ( !m_plots().empty() )
{
std::vector<RimPlotInterface*> plotInterfaces;
for ( auto ptr : m_plots() )
{
plotInterfaces.push_back( reinterpret_cast<RimPlotInterface*>( ptr ) );
}
plotWindow->movePlotsToThis( plotInterfaces, nullptr );
}
plotCollection->updateAllRequiredEditors();
plotWindow->loadDataAndUpdate();
RiuPlotMainWindowTools::setExpanded( plotCollection, true );
RiuPlotMainWindowTools::selectAsCurrentItem( plotWindow, true );
return RicfCommandResponse();
}
@ -82,19 +58,7 @@ RicfCommandResponse RicNewGridPlotWindowFeature::execute()
//--------------------------------------------------------------------------------------------------
bool RicNewGridPlotWindowFeature::isCommandEnabled()
{
RimGridPlotWindowCollection* gridPlotCollection =
caf::SelectionManager::instance()->selectedItemOfType<RimGridPlotWindowCollection>();
if ( gridPlotCollection )
{
return true;
}
auto selectedPlots = selectedPlotInterfaces();
std::vector<caf::PdmUiItem*> selectedUiItems;
caf::SelectionManager::instance()->selectedItems( selectedUiItems );
return !selectedPlots.empty() && selectedPlots.size() == selectedUiItems.size();
return false;
}
//--------------------------------------------------------------------------------------------------

View File

@ -85,9 +85,6 @@ RimMainPlotCollection::RimMainPlotCollection()
"" );
m_saturationPressurePlotCollection.uiCapability()->setUiHidden( true );
CAF_PDM_InitFieldNoDefault( &m_combinationPlotCollection, "RimGridPlotWindowCollection", "Combination Plots", "", "", "" );
m_combinationPlotCollection.uiCapability()->setUiHidden( true );
m_wellLogPlotCollection = new RimWellLogPlotCollection();
m_rftPlotCollection = new RimRftPlotCollection();
m_pltPlotCollection = new RimPltPlotCollection();
@ -96,7 +93,6 @@ RimMainPlotCollection::RimMainPlotCollection()
m_flowPlotCollection = new RimFlowPlotCollection();
m_gridCrossPlotCollection = new RimGridCrossPlotCollection;
m_saturationPressurePlotCollection = new RimSaturationPressurePlotCollection;
m_combinationPlotCollection = new RimGridPlotWindowCollection;
}
//--------------------------------------------------------------------------------------------------
@ -185,14 +181,6 @@ RimSaturationPressurePlotCollection* RimMainPlotCollection::saturationPressurePl
return m_saturationPressurePlotCollection();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimGridPlotWindowCollection* RimMainPlotCollection::combinationPlotCollection()
{
return m_combinationPlotCollection();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@ -205,8 +193,6 @@ void RimMainPlotCollection::deleteAllContainedObjects()
m_summaryCrossPlotCollection()->deleteAllChildObjects();
m_gridCrossPlotCollection->deleteAllChildObjects();
m_flowPlotCollection()->closeDefaultPlotWindowAndDeletePlots();
m_saturationPressurePlotCollection()->deleteAllChildObjects();
m_combinationPlotCollection()->deleteAllChildObjects();
}
//--------------------------------------------------------------------------------------------------
@ -258,14 +244,6 @@ void RimMainPlotCollection::updatePlotsWithFormations()
crossPlot->loadDataAndUpdate();
}
}
if ( m_combinationPlotCollection )
{
for ( RimGridPlotWindow* plotWindow : m_combinationPlotCollection->gridPlotWindows() )
{
plotWindow->loadDataAndUpdate();
}
}
}
//--------------------------------------------------------------------------------------------------
@ -280,14 +258,6 @@ void RimMainPlotCollection::updatePlotsWithCompletions()
wellLogPlot->loadDataAndUpdate();
}
}
if ( m_combinationPlotCollection )
{
for ( RimGridPlotWindow* plotWindow : m_combinationPlotCollection->gridPlotWindows() )
{
plotWindow->loadDataAndUpdate();
}
}
}
//--------------------------------------------------------------------------------------------------

View File

@ -59,7 +59,6 @@ public:
RimFlowPlotCollection* flowPlotCollection();
RimGridCrossPlotCollection* gridCrossPlotCollection();
RimSaturationPressurePlotCollection* saturationPressurePlotCollection();
RimGridPlotWindowCollection* combinationPlotCollection();
void deleteAllContainedObjects();
void updateCurrentTimeStepInPlots();
@ -84,7 +83,6 @@ private:
caf::PdmChildField<RimFlowPlotCollection*> m_flowPlotCollection;
caf::PdmChildField<RimGridCrossPlotCollection*> m_gridCrossPlotCollection;
caf::PdmChildField<RimSaturationPressurePlotCollection*> m_saturationPressurePlotCollection;
caf::PdmChildField<RimGridPlotWindowCollection*> m_combinationPlotCollection;
caf::PdmField<bool> m_show;
};

View File

@ -1295,11 +1295,6 @@ void RimProject::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, Q
{
itemCollection->add( mainPlotCollection->saturationPressurePlotCollection() );
}
if ( mainPlotCollection->combinationPlotCollection() )
{
itemCollection->add( mainPlotCollection->combinationPlotCollection() );
}
}
}
else

View File

@ -178,14 +178,5 @@ void RimReloadCaseTools::updateAllPlots()
{
flowPlotCollection->loadDataAndUpdate();
}
RimGridPlotWindowCollection* gridPlotWindowCollection = project->mainPlotCollection()->combinationPlotCollection();
if ( gridPlotWindowCollection )
{
for ( RimGridPlotWindow* plotWindow : gridPlotWindowCollection->gridPlotWindows() )
{
plotWindow->loadDataAndUpdate();
}
}
}
}

View File

@ -212,7 +212,7 @@ RimSummaryPlot::RimSummaryPlot()
m_textCurveSetEditor = new RimSummaryPlotFilterTextCurveSetEditor;
m_isCrossPlot = false;
m_isDraggable = true;
m_isDraggable = false;
m_nameHelperAllCurves.reset( new RimSummaryPlotNameHelper );

View File

@ -717,7 +717,6 @@ void RiuPlotMainWindow::slotSubWindowActivated( QMdiSubWindow* subWindow )
updateWellLogPlotToolBar();
updateSummaryPlotToolBar();
updateGridPlotWindowToolBar();
}
//--------------------------------------------------------------------------------------------------

View File

@ -62,7 +62,7 @@
//--------------------------------------------------------------------------------------------------
RiuQwtPlotWidget::RiuQwtPlotWidget( RimPlotInterface* plotTrackDefinition, QWidget* parent )
: QwtPlot( parent )
, m_draggable( true )
, m_draggable( false )
{
m_plotOwner = dynamic_cast<caf::PdmObject*>( plotTrackDefinition );
CAF_ASSERT( m_plotOwner );