mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4825 Summary Plot Stepping : Key events are not routed correctly
This commit is contained in:
@@ -556,31 +556,7 @@ void RiuPlotMainWindow::updateSummaryPlotToolBar( bool forceUpdateUi )
|
||||
RimSummaryPlot* summaryPlot = dynamic_cast<RimSummaryPlot*>( m_activePlotViewWindow.p() );
|
||||
if ( summaryPlot )
|
||||
{
|
||||
std::vector<caf::PdmFieldHandle*> toolBarFields;
|
||||
|
||||
RimEnsembleCurveSetCollection* ensembleCurveSetColl = nullptr;
|
||||
|
||||
caf::PdmObjectHandle* selectedObj = dynamic_cast<caf::PdmObjectHandle*>(
|
||||
caf::SelectionManager::instance()->selectedItem() );
|
||||
if ( selectedObj )
|
||||
{
|
||||
selectedObj->firstAncestorOrThisOfType( ensembleCurveSetColl );
|
||||
}
|
||||
|
||||
if ( ensembleCurveSetColl )
|
||||
{
|
||||
toolBarFields = ensembleCurveSetColl->fieldsToShowInToolbar();
|
||||
}
|
||||
else
|
||||
{
|
||||
toolBarFields = summaryPlot->summaryCurveCollection()->fieldsToShowInToolbar();
|
||||
|
||||
if ( toolBarFields.empty() )
|
||||
{
|
||||
// Show ensemble stepping if no fields are available from summary stepping
|
||||
toolBarFields = summaryPlot->ensembleCurveSetCollection()->fieldsToShowInToolbar();
|
||||
}
|
||||
}
|
||||
std::vector<caf::PdmFieldHandle*> toolBarFields = summaryPlot->fieldsToShowInToolbar();
|
||||
|
||||
if ( !m_summaryPlotToolBarEditor->isEditorDataValid( toolBarFields ) )
|
||||
{
|
||||
|
||||
@@ -169,10 +169,9 @@ void RiuSummaryQwtPlot::keyPressEvent( QKeyEvent* keyEvent )
|
||||
{
|
||||
RimSummaryPlot* summaryPlot = dynamic_cast<RimSummaryPlot*>( ownerPlotDefinition() );
|
||||
|
||||
if ( summaryPlot && summaryPlot->summaryCurveCollection() )
|
||||
if ( summaryPlot )
|
||||
{
|
||||
RimSummaryCurveCollection* curveColl = summaryPlot->summaryCurveCollection();
|
||||
curveColl->handleKeyPressEvent( keyEvent );
|
||||
summaryPlot->handleKeyPressEvent( keyEvent );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user