From 4d0c1d17b40c0183d27af3fc5ded76f70c9b5611 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20St=C3=B8ren?= Date: Sun, 22 Nov 2015 15:04:09 +0100 Subject: [PATCH] cafViewer: Add static model(s) to mainScene as well. --- Fwk/AppFwk/cafViewer/cafViewer.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Fwk/AppFwk/cafViewer/cafViewer.cpp b/Fwk/AppFwk/cafViewer/cafViewer.cpp index 93b3c78be1..4e624bb288 100644 --- a/Fwk/AppFwk/cafViewer/cafViewer.cpp +++ b/Fwk/AppFwk/cafViewer/cafViewer.cpp @@ -872,6 +872,11 @@ void caf::Viewer::removeModelFromAllFrames(cvf::Model* model) scene->removeModel(model); } + + if (m_mainScene.notNull()) + { + m_mainScene->removeModel(model); + } } //-------------------------------------------------------------------------------------------------- @@ -885,7 +890,12 @@ void caf::Viewer::appendModelToAllFrames(cvf::Model* model) scene->addModel(model); } -} + + if (m_mainScene.notNull()) + { + m_mainScene->addModel(model); + } +} //-------------------------------------------------------------------------------------------------- ///