mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Summary multiplot improvements (#8598)
* Create multi summary plot from summary plot(s) * Rearrange multi summary plot properties * Enable source stepping toolbar for multi summary plot * Automatically activate new summary plot when creating from data sources -> data vector tree * Enable global key controls for switching data in summary and multi summary plots * Update tooltip texts for summary plot toolbar
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include "RimProject.h"
|
||||
#include "RimSummaryCaseMainCollection.h"
|
||||
#include "RimSummaryCurveCollection.h"
|
||||
#include "RimSummaryMultiPlot.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
#include "RimSummaryPlotCollection.h"
|
||||
#include "RimSummaryPlotFilterTextCurveSetEditor.h"
|
||||
@@ -702,17 +703,22 @@ void RiuPlotMainWindow::updateMultiPlotToolBar()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuPlotMainWindow::updateSummaryPlotToolBar( bool forceUpdateUi )
|
||||
{
|
||||
RimSummaryPlot* summaryPlot = dynamic_cast<RimSummaryPlot*>( m_activePlotViewWindow.p() );
|
||||
RimMultiPlot* multiPlot = dynamic_cast<RimMultiPlot*>( m_activePlotViewWindow.p() );
|
||||
if ( multiPlot )
|
||||
RimSummaryPlot* summaryPlot = dynamic_cast<RimSummaryPlot*>( m_activePlotViewWindow.p() );
|
||||
RimSummaryMultiPlot* summaryMultiPlot = dynamic_cast<RimSummaryMultiPlot*>( m_activePlotViewWindow.p() );
|
||||
|
||||
std::vector<caf::PdmFieldHandle*> toolBarFields;
|
||||
|
||||
if ( summaryMultiPlot )
|
||||
{
|
||||
summaryPlot = caf::SelectionManager::instance()->selectedItemOfType<RimSummaryPlot>();
|
||||
toolBarFields = summaryMultiPlot->fieldsToShowInToolbar();
|
||||
}
|
||||
else if ( summaryPlot )
|
||||
{
|
||||
toolBarFields = summaryPlot->fieldsToShowInToolbar();
|
||||
}
|
||||
|
||||
if ( summaryPlot )
|
||||
if ( toolBarFields.size() > 0 )
|
||||
{
|
||||
std::vector<caf::PdmFieldHandle*> toolBarFields = summaryPlot->fieldsToShowInToolbar();
|
||||
|
||||
QString keyword;
|
||||
|
||||
if ( !m_summaryPlotToolBarEditor->isEditorDataValid( toolBarFields ) )
|
||||
@@ -997,6 +1003,16 @@ void RiuPlotMainWindow::selectedObjectsChanged()
|
||||
{
|
||||
updateSummaryPlotToolBar();
|
||||
}
|
||||
else
|
||||
{
|
||||
RimSummaryMultiPlot* multiSummaryPlot = nullptr;
|
||||
firstSelectedObject->firstAncestorOrThisOfType( multiSummaryPlot );
|
||||
if ( multiSummaryPlot )
|
||||
{
|
||||
updateSummaryPlotToolBar();
|
||||
updateMultiPlotToolBar();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// The only way to get to this code is by selection change initiated from the project tree view
|
||||
|
||||
Reference in New Issue
Block a user