From cc397efe3e58babddcce0db12ed4926f0e0ec743 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Thu, 5 May 2022 11:29:07 +0200 Subject: [PATCH] Performance : Simplify use of update schedulers Extract code to RiaScheduler Add PlotCollectionScheduler --- .../Application/CMakeLists_files.cmake | 5 ++ .../RiaCompletionTypeCalculationScheduler.cpp | 71 ++++++++-------- .../RiaCompletionTypeCalculationScheduler.h | 18 ++-- .../RiaPlotCollectionScheduler.cpp | 73 ++++++++++++++++ .../Application/RiaPlotCollectionScheduler.h | 42 ++++++++++ .../Application/RiaScheduler.cpp | 83 +++++++++++++++++++ ApplicationLibCode/Application/RiaScheduler.h | 47 +++++++++++ .../Application/RiaViewRedrawScheduler.cpp | 62 ++++---------- .../Application/RiaViewRedrawScheduler.h | 36 +++----- .../RimMainPlotCollection.cpp | 7 +- .../ProjectDataModel/RimMainPlotCollection.h | 2 +- .../ProjectDataModel/RimProject.cpp | 4 +- 12 files changed, 330 insertions(+), 120 deletions(-) create mode 100644 ApplicationLibCode/Application/RiaPlotCollectionScheduler.cpp create mode 100644 ApplicationLibCode/Application/RiaPlotCollectionScheduler.h create mode 100644 ApplicationLibCode/Application/RiaScheduler.cpp create mode 100644 ApplicationLibCode/Application/RiaScheduler.h diff --git a/ApplicationLibCode/Application/CMakeLists_files.cmake b/ApplicationLibCode/Application/CMakeLists_files.cmake index 1a4af7591e..f69791efcb 100644 --- a/ApplicationLibCode/Application/CMakeLists_files.cmake +++ b/ApplicationLibCode/Application/CMakeLists_files.cmake @@ -27,6 +27,8 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RiaNumberFormat.h ${CMAKE_CURRENT_LIST_DIR}/RiaRftDefines.h ${CMAKE_CURRENT_LIST_DIR}/RiaDateTimeDefines.h + ${CMAKE_CURRENT_LIST_DIR}/RiaPlotCollectionScheduler.h + ${CMAKE_CURRENT_LIST_DIR}/RiaScheduler.h ) set(SOURCE_GROUP_SOURCE_FILES @@ -58,6 +60,8 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RiaNumberFormat.cpp ${CMAKE_CURRENT_LIST_DIR}/RiaRftDefines.cpp ${CMAKE_CURRENT_LIST_DIR}/RiaDateTimeDefines.cpp + ${CMAKE_CURRENT_LIST_DIR}/RiaPlotCollectionScheduler.cpp + ${CMAKE_CURRENT_LIST_DIR}/RiaScheduler.cpp ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) @@ -71,6 +75,7 @@ set(QT_MOC_HEADERS ${CMAKE_CURRENT_LIST_DIR}/RiaCompletionTypeCalculationScheduler.h ${CMAKE_CURRENT_LIST_DIR}/RiaViewRedrawScheduler.h ${CMAKE_CURRENT_LIST_DIR}/RiaPlotWindowRedrawScheduler.h + ${CMAKE_CURRENT_LIST_DIR}/RiaScheduler.h ) source_group( diff --git a/ApplicationLibCode/Application/RiaCompletionTypeCalculationScheduler.cpp b/ApplicationLibCode/Application/RiaCompletionTypeCalculationScheduler.cpp index 3730f07273..346ea6e38f 100644 --- a/ApplicationLibCode/Application/RiaCompletionTypeCalculationScheduler.cpp +++ b/ApplicationLibCode/Application/RiaCompletionTypeCalculationScheduler.cpp @@ -78,38 +78,50 @@ void RiaCompletionTypeCalculationScheduler::scheduleRecalculateCompletionTypeAnd void RiaCompletionTypeCalculationScheduler::scheduleRecalculateCompletionTypeAndRedrawAllViews( const std::vector& eclipseCases ) { + clearCompletionTypeResults( eclipseCases ); + for ( RimEclipseCase* eclipseCase : eclipseCases ) { - CVF_ASSERT( eclipseCase ); - - if ( eclipseCase->eclipseCaseData() ) - { - eclipseCase->eclipseCaseData() - ->results( RiaDefines::PorosityModelType::MATRIX_MODEL ) - ->clearScalarResult( RiaDefines::ResultCatType::DYNAMIC_NATIVE, - RiaResultNames::completionTypeResultName() ); - - // Delete virtual perforation transmissibilities, as these are the basis for the computation of completion type - eclipseCase->eclipseCaseData()->setVirtualPerforationTransmissibilities( nullptr ); - } - - m_eclipseCasesToRecalculate.push_back( eclipseCase ); + if ( eclipseCase ) m_eclipseCasesToRecalculate.emplace_back( eclipseCase ); } - startTimer(); + startTimer( 0 ); } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiaCompletionTypeCalculationScheduler::slotRecalculateCompletionType() +void RiaCompletionTypeCalculationScheduler::clearCompletionTypeResultsInAllCases() { - if ( caf::ProgressState::isActive() ) - { - startTimer(); - return; - } + std::vector eclipseCases = + RimProject::current()->activeOilField()->analysisModels->cases().childObjects(); + clearCompletionTypeResults( eclipseCases ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaCompletionTypeCalculationScheduler::clearCompletionTypeResults( const std::vector& eclipseCases ) +{ + for ( RimEclipseCase* eclipseCase : eclipseCases ) + { + if ( !eclipseCase || !eclipseCase->eclipseCaseData() ) continue; + + eclipseCase->eclipseCaseData() + ->results( RiaDefines::PorosityModelType::MATRIX_MODEL ) + ->clearScalarResult( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::completionTypeResultName() ); + + // Delete virtual perforation transmissibilities, as these are the basis for the computation of completion type + eclipseCase->eclipseCaseData()->setVirtualPerforationTransmissibilities( nullptr ); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaCompletionTypeCalculationScheduler::performScheduledUpdates() +{ std::set uniqueCases( m_eclipseCasesToRecalculate.begin(), m_eclipseCasesToRecalculate.end() ); Rim3dView* activeView = RiaApplication::instance()->activeReservoirView(); @@ -149,28 +161,11 @@ void RiaCompletionTypeCalculationScheduler::slotRecalculateCompletionType() //-------------------------------------------------------------------------------------------------- RiaCompletionTypeCalculationScheduler::~RiaCompletionTypeCalculationScheduler() { - delete m_recalculateCompletionTypeTimer; } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- RiaCompletionTypeCalculationScheduler::RiaCompletionTypeCalculationScheduler() - : m_recalculateCompletionTypeTimer( nullptr ) { } - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiaCompletionTypeCalculationScheduler::startTimer() -{ - if ( !m_recalculateCompletionTypeTimer ) - { - m_recalculateCompletionTypeTimer = new QTimer( this ); - m_recalculateCompletionTypeTimer->setSingleShot( true ); - connect( m_recalculateCompletionTypeTimer, SIGNAL( timeout() ), this, SLOT( slotRecalculateCompletionType() ) ); - } - - m_recalculateCompletionTypeTimer->start( 1500 ); -} diff --git a/ApplicationLibCode/Application/RiaCompletionTypeCalculationScheduler.h b/ApplicationLibCode/Application/RiaCompletionTypeCalculationScheduler.h index 9ea5fb94c3..1f7ad10416 100644 --- a/ApplicationLibCode/Application/RiaCompletionTypeCalculationScheduler.h +++ b/ApplicationLibCode/Application/RiaCompletionTypeCalculationScheduler.h @@ -18,29 +18,30 @@ #pragma once -#include "cafPdmPointer.h" +#include "RiaScheduler.h" -#include +#include "cafPdmPointer.h" #include -class QTimer; class RimEclipseCase; //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -class RiaCompletionTypeCalculationScheduler : public QObject +class RiaCompletionTypeCalculationScheduler : public RiaScheduler { Q_OBJECT; public: static RiaCompletionTypeCalculationScheduler* instance(); void scheduleRecalculateCompletionTypeAndRedrawAllViews(); - void scheduleRecalculateCompletionTypeAndRedrawAllViews( RimEclipseCase* eclipseCase ); + void clearCompletionTypeResultsInAllCases(); -private slots: - void slotRecalculateCompletionType(); + void scheduleRecalculateCompletionTypeAndRedrawAllViews( RimEclipseCase* eclipseCase ); + void clearCompletionTypeResults( const std::vector& eclipseCases ); + + void performScheduledUpdates() override; private: RiaCompletionTypeCalculationScheduler(); @@ -51,9 +52,6 @@ private: void scheduleRecalculateCompletionTypeAndRedrawAllViews( const std::vector& eclipseCases ); - void startTimer(); - private: std::vector> m_eclipseCasesToRecalculate; - QTimer* m_recalculateCompletionTypeTimer; }; diff --git a/ApplicationLibCode/Application/RiaPlotCollectionScheduler.cpp b/ApplicationLibCode/Application/RiaPlotCollectionScheduler.cpp new file mode 100644 index 0000000000..25055c0893 --- /dev/null +++ b/ApplicationLibCode/Application/RiaPlotCollectionScheduler.cpp @@ -0,0 +1,73 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2022- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RiaPlotCollectionScheduler.h" + +#include "RimAbstractPlotCollection.h" +#include "RimViewWindow.h" + +#include "cafProgressState.h" + +#include + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiaPlotCollectionScheduler::RiaPlotCollectionScheduler() +{ +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiaPlotCollectionScheduler::~RiaPlotCollectionScheduler() +{ +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiaPlotCollectionScheduler* RiaPlotCollectionScheduler::instance() +{ + static RiaPlotCollectionScheduler theInstance; + + return &theInstance; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaPlotCollectionScheduler::schedulePlotCollectionUpdate( const std::vector plotCollections ) +{ + m_plotCollectionsToUpdate.insert( m_plotCollectionsToUpdate.end(), plotCollections.begin(), plotCollections.end() ); + + startTimer( 0 ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaPlotCollectionScheduler::performScheduledUpdates() +{ + for ( auto p : m_plotCollectionsToUpdate ) + { + if ( p == nullptr ) continue; + + p->loadDataAndUpdateAllPlots(); + } +} diff --git a/ApplicationLibCode/Application/RiaPlotCollectionScheduler.h b/ApplicationLibCode/Application/RiaPlotCollectionScheduler.h new file mode 100644 index 0000000000..aded19656a --- /dev/null +++ b/ApplicationLibCode/Application/RiaPlotCollectionScheduler.h @@ -0,0 +1,42 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2022- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "RiaScheduler.h" + +class RimPlotCollection; + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +class RiaPlotCollectionScheduler : public RiaScheduler +{ +public: + RiaPlotCollectionScheduler(); + ~RiaPlotCollectionScheduler() override; + + static RiaPlotCollectionScheduler* instance(); + + void schedulePlotCollectionUpdate( const std::vector plotCollections ); + + void performScheduledUpdates() override; + +private: + std::vector m_plotCollectionsToUpdate; +}; diff --git a/ApplicationLibCode/Application/RiaScheduler.cpp b/ApplicationLibCode/Application/RiaScheduler.cpp new file mode 100644 index 0000000000..123ef0b5bc --- /dev/null +++ b/ApplicationLibCode/Application/RiaScheduler.cpp @@ -0,0 +1,83 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2022- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RiaScheduler.h" + +#include "cafProgressState.h" + +#include + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiaScheduler::RiaScheduler() +{ +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiaScheduler::~RiaScheduler() +{ +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaScheduler::slotUpdateScheduledItemsWhenReady() +{ + if ( caf::ProgressState::isActive() ) + { + startTimer( 100 ); + return; + } + + performScheduledUpdates(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaScheduler::startTimer( int msecs ) +{ + if ( !m_updateTimer ) + { + m_updateTimer.reset( new QTimer( this ) ); + connect( m_updateTimer.data(), SIGNAL( timeout() ), this, SLOT( slotUpdateScheduledItemsWhenReady() ) ); + } + + if ( !m_updateTimer->isActive() ) + { + m_updateTimer->setSingleShot( true ); + m_updateTimer->start( msecs ); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaScheduler::waitUntilWorkIsDone() +{ + if ( m_updateTimer ) + { + while ( m_updateTimer->isActive() ) + { + QCoreApplication::processEvents(); + } + } +} diff --git a/ApplicationLibCode/Application/RiaScheduler.h b/ApplicationLibCode/Application/RiaScheduler.h new file mode 100644 index 0000000000..d0e1ec1c53 --- /dev/null +++ b/ApplicationLibCode/Application/RiaScheduler.h @@ -0,0 +1,47 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2022- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include +#include +#include + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +class RiaScheduler : public QObject +{ + Q_OBJECT + +public: + RiaScheduler(); + virtual ~RiaScheduler(); + + virtual void performScheduledUpdates() = 0; + +protected: + void startTimer( int msecs ); + void waitUntilWorkIsDone(); + +private slots: + void slotUpdateScheduledItemsWhenReady(); + +private: + QScopedPointer m_updateTimer; +}; diff --git a/ApplicationLibCode/Application/RiaViewRedrawScheduler.cpp b/ApplicationLibCode/Application/RiaViewRedrawScheduler.cpp index 622574db93..67b8d1de9e 100644 --- a/ApplicationLibCode/Application/RiaViewRedrawScheduler.cpp +++ b/ApplicationLibCode/Application/RiaViewRedrawScheduler.cpp @@ -17,14 +17,25 @@ ///////////////////////////////////////////////////////////////////////////////// #include "RiaViewRedrawScheduler.h" + #include "Rim3dView.h" -#include -#include - -#include "cafProgressState.h" #include +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiaViewRedrawScheduler::RiaViewRedrawScheduler() +{ +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiaViewRedrawScheduler::~RiaViewRedrawScheduler() +{ +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -51,13 +62,8 @@ void RiaViewRedrawScheduler::scheduleDisplayModelUpdateAndRedraw( Rim3dView* res //-------------------------------------------------------------------------------------------------- void RiaViewRedrawScheduler::clearViewsScheduledForUpdate() { - if ( m_resViewUpdateTimer ) - { - while ( m_resViewUpdateTimer->isActive() ) - { - QCoreApplication::processEvents(); - } - } + waitUntilWorkIsDone(); + m_resViewsToUpdate.clear(); } @@ -105,39 +111,7 @@ void RiaViewRedrawScheduler::updateAndRedrawScheduledViews() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiaViewRedrawScheduler::slotUpdateAndRedrawScheduledViewsWhenReady() +void RiaViewRedrawScheduler::performScheduledUpdates() { - if ( caf::ProgressState::isActive() ) - { - startTimer( 100 ); - return; - } - updateAndRedrawScheduledViews(); } - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiaViewRedrawScheduler::startTimer( int msecs ) -{ - if ( !m_resViewUpdateTimer ) - { - m_resViewUpdateTimer = new QTimer( this ); - connect( m_resViewUpdateTimer, SIGNAL( timeout() ), this, SLOT( slotUpdateAndRedrawScheduledViewsWhenReady() ) ); - } - - if ( !m_resViewUpdateTimer->isActive() ) - { - m_resViewUpdateTimer->setSingleShot( true ); - m_resViewUpdateTimer->start( msecs ); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RiaViewRedrawScheduler::~RiaViewRedrawScheduler() -{ - delete m_resViewUpdateTimer; -} diff --git a/ApplicationLibCode/Application/RiaViewRedrawScheduler.h b/ApplicationLibCode/Application/RiaViewRedrawScheduler.h index e80f38b801..59f31daae6 100644 --- a/ApplicationLibCode/Application/RiaViewRedrawScheduler.h +++ b/ApplicationLibCode/Application/RiaViewRedrawScheduler.h @@ -18,38 +18,28 @@ #pragma once +#include "RiaScheduler.h" + #include "cafPdmPointer.h" -#include + #include -class QTimer; class Rim3dView; -class RiaViewRedrawScheduler : public QObject +class RiaViewRedrawScheduler : public RiaScheduler { - Q_OBJECT; - public: - static RiaViewRedrawScheduler* instance(); - void scheduleDisplayModelUpdateAndRedraw( Rim3dView* resViewToUpdate ); - void clearViewsScheduledForUpdate(); - void updateAndRedrawScheduledViews(); - -private slots: - void slotUpdateAndRedrawScheduledViewsWhenReady(); - -private: - void startTimer( int msecs ); - - RiaViewRedrawScheduler() - : m_resViewUpdateTimer( nullptr ) - { - } + RiaViewRedrawScheduler(); ~RiaViewRedrawScheduler() override; - RiaViewRedrawScheduler( const RiaViewRedrawScheduler& o ) = delete; - void operator=( const RiaViewRedrawScheduler& o ) = delete; + static RiaViewRedrawScheduler* instance(); + void scheduleDisplayModelUpdateAndRedraw( Rim3dView* resViewToUpdate ); + void clearViewsScheduledForUpdate(); + void updateAndRedrawScheduledViews(); + + void performScheduledUpdates() override; + +private: std::vector> m_resViewsToUpdate; - QTimer* m_resViewUpdateTimer; }; diff --git a/ApplicationLibCode/ProjectDataModel/RimMainPlotCollection.cpp b/ApplicationLibCode/ProjectDataModel/RimMainPlotCollection.cpp index fb6180036f..12d4e442c1 100644 --- a/ApplicationLibCode/ProjectDataModel/RimMainPlotCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimMainPlotCollection.cpp @@ -19,6 +19,8 @@ #include "RimMainPlotCollection.h" +#include "RiaPlotCollectionScheduler.h" + #include "PlotBuilderCommands/RicSummaryPlotBuilder.h" #include "RimAbstractPlotCollection.h" @@ -340,10 +342,11 @@ void RimMainPlotCollection::updatePlotsWithFormations() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimMainPlotCollection::updatePlotsWithCompletions() +void RimMainPlotCollection::scheduleUpdatePlotsWithCompletions() { std::vector plotCollections = plotCollectionsWithCompletions(); - loadDataAndUpdatePlotCollections( plotCollections ); + + RiaPlotCollectionScheduler::instance()->schedulePlotCollectionUpdate( plotCollections ); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/RimMainPlotCollection.h b/ApplicationLibCode/ProjectDataModel/RimMainPlotCollection.h index b21e44fa33..9114c8da08 100644 --- a/ApplicationLibCode/ProjectDataModel/RimMainPlotCollection.h +++ b/ApplicationLibCode/ProjectDataModel/RimMainPlotCollection.h @@ -84,7 +84,7 @@ public: void deleteAllContainedObjects(); void updateCurrentTimeStepInPlots(); void updatePlotsWithFormations(); - void updatePlotsWithCompletions(); + void scheduleUpdatePlotsWithCompletions(); void deleteAllCachedData(); void ensureDefaultFlowPlotsAreCreated(); void ensureCalculationIdsAreAssigned(); diff --git a/ApplicationLibCode/ProjectDataModel/RimProject.cpp b/ApplicationLibCode/ProjectDataModel/RimProject.cpp index 686580de7c..722e8c1756 100644 --- a/ApplicationLibCode/ProjectDataModel/RimProject.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimProject.cpp @@ -999,10 +999,10 @@ void RimProject::setSubWindowsTiledInPlotWindow( bool tiled ) //-------------------------------------------------------------------------------------------------- void RimProject::reloadCompletionTypeResultsInAllViews() { + RiaCompletionTypeCalculationScheduler::instance()->clearCompletionTypeResultsInAllCases(); scheduleCreateDisplayModelAndRedrawAllViews(); - RiaCompletionTypeCalculationScheduler::instance()->scheduleRecalculateCompletionTypeAndRedrawAllViews(); - this->mainPlotCollection()->updatePlotsWithCompletions(); + mainPlotCollection()->scheduleUpdatePlotsWithCompletions(); } //--------------------------------------------------------------------------------------------------