mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Summary Multiplot: sync plot selection in tree with view (#8788)
* Make sure the subplot selected in the tree is shown in the multiplot viewer. * Clean up multiplot toolbar handling a bit * Remove old summary plot toolbar.
This commit is contained in:
@@ -41,7 +41,6 @@ set(SOURCE_GROUP_HEADER_FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicSetSourceSteppingSummaryCurveFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicClearSourceSteppingEnsembleCurveSetFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicSetSourceSteppingEnsembleCurveSetFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicActivateCurveFilterInToolbarFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicNewDerivedSummaryFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicNewPlotAxisPropertiesFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicShowSummaryPlotManagerFeature.h
|
||||
@@ -90,7 +89,6 @@ set(SOURCE_GROUP_SOURCE_FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicSetSourceSteppingSummaryCurveFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicClearSourceSteppingEnsembleCurveSetFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicSetSourceSteppingEnsembleCurveSetFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicActivateCurveFilterInToolbarFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicNewDerivedSummaryFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicNewPlotAxisPropertiesFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicShowSummaryPlotManagerFeature.cpp
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2019- Equinor ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RicActivateCurveFilterInToolbarFeature.h"
|
||||
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiuPlotMainWindow.h"
|
||||
|
||||
#include <QAction>
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicActivateCurveFilterInToolbarFeature, "RicActivateCurveFilterInToolbarFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicActivateCurveFilterInToolbarFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicActivateCurveFilterInToolbarFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
if ( RiaGuiApplication::isRunning() )
|
||||
{
|
||||
auto plotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||
if ( plotWindow )
|
||||
{
|
||||
plotWindow->setFocusToLineEditInSummaryToolBar();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicActivateCurveFilterInToolbarFeature::setupActionLook( QAction* actionToSetup )
|
||||
{
|
||||
actionToSetup->setText( "Activate Summary Curve Filter Editor" );
|
||||
|
||||
applyShortcutWithHintToAction( actionToSetup, QKeySequence( tr( "Ctrl+F" ) ) );
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2019- Equinor ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cafCmdFeature.h"
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicActivateCurveFilterInToolbarFeature : public caf::CmdFeature
|
||||
{
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
@@ -77,7 +77,7 @@ void RicNewSummaryCrossPlotCurveFeature::onActionTriggered( bool isChecked )
|
||||
RiaGuiApplication::instance()->getOrCreateAndShowMainPlotWindow()->selectAsCurrentItem( newCurve );
|
||||
|
||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||
mainPlotWindow->updateSummaryPlotToolBar();
|
||||
mainPlotWindow->updateMultiPlotToolBar();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ void RicNewSummaryCurveFeature::onActionTriggered( bool isChecked )
|
||||
app->getOrCreateAndShowMainPlotWindow()->selectAsCurrentItem( newCurve );
|
||||
|
||||
RiuPlotMainWindow* mainPlotWindow = app->mainPlotWindow();
|
||||
mainPlotWindow->updateSummaryPlotToolBar();
|
||||
mainPlotWindow->updateMultiPlotToolBar();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ RimSummaryPlot*
|
||||
if ( mainPlotWindow )
|
||||
{
|
||||
mainPlotWindow->selectAsCurrentItem( firstCurveSetCreated );
|
||||
mainPlotWindow->updateSummaryPlotToolBar();
|
||||
mainPlotWindow->updateMultiPlotToolBar();
|
||||
}
|
||||
return plot;
|
||||
}
|
||||
@@ -183,7 +183,7 @@ void RicNewSummaryEnsembleCurveSetFeature::onActionTriggered( bool isChecked )
|
||||
if ( mainPlotWindow && firstCurveSet )
|
||||
{
|
||||
mainPlotWindow->selectAsCurrentItem( firstCurveSet );
|
||||
mainPlotWindow->updateSummaryPlotToolBar();
|
||||
mainPlotWindow->updateMultiPlotToolBar();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ void RicSummaryPlotEditorUi::fieldChangedByUi( const caf::PdmFieldHandle* change
|
||||
field->setValueWithFieldChanged( true );
|
||||
|
||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||
mainPlotWindow->updateSummaryPlotToolBar();
|
||||
mainPlotWindow->updateMultiPlotToolBar();
|
||||
}
|
||||
else if ( changedField == &m_useAutoAppearanceAssignment && m_useAutoAppearanceAssignment )
|
||||
{
|
||||
@@ -861,7 +861,7 @@ void RicSummaryPlotEditorUi::createNewPlot()
|
||||
m_targetPlot = newSummaryPlot;
|
||||
|
||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||
mainPlotWindow->updateSummaryPlotToolBar();
|
||||
mainPlotWindow->updateMultiPlotToolBar();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user