From b55beb7e13dd9e93a17aad94e6630c4f2ec07851 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20St=C3=B8ren?= Date: Fri, 18 Sep 2015 17:02:24 +0200 Subject: [PATCH] (#401) Update dependent views after independent ones The dependent views needs the visibility from their masters --- .../Application/RiaApplication.cpp | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/ApplicationCode/Application/RiaApplication.cpp b/ApplicationCode/Application/RiaApplication.cpp index b7a1a83798..6fc0f14b4b 100644 --- a/ApplicationCode/Application/RiaApplication.cpp +++ b/ApplicationCode/Application/RiaApplication.cpp @@ -1967,13 +1967,28 @@ void RiaApplication::scheduleDisplayModelUpdateAndRedraw(RimView* resViewToUpdat void RiaApplication::slotUpdateScheduledDisplayModels() { // Compress to remove duplicates - std::set resViewsToUpdate; + // and update dependent views after independent views + + std::set independent3DViewsToUpdate; + std::set dependent3DViewsToUpdate; + for (size_t i = 0; i < m_resViewsToUpdate.size(); ++i) { - resViewsToUpdate.insert(m_resViewsToUpdate[i]); + if (m_resViewsToUpdate[i]->controllingViewLink()) + dependent3DViewsToUpdate.insert(m_resViewsToUpdate[i]); + else + independent3DViewsToUpdate.insert(m_resViewsToUpdate[i]); + } + + for (std::set::iterator it = independent3DViewsToUpdate.begin(); it != independent3DViewsToUpdate.end(); ++it ) + { + if (*it) + { + (*it)->createDisplayModelAndRedraw(); + } } - for (std::set::iterator it = resViewsToUpdate.begin(); it != resViewsToUpdate.end(); ++it ) + for (std::set::iterator it = dependent3DViewsToUpdate.begin(); it != dependent3DViewsToUpdate.end(); ++it) { if (*it) {