From 655b40267b9aa24587620694866e244a2a44023d Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Thu, 29 Oct 2015 11:27:01 +0100 Subject: [PATCH] changed instance selection model (primary selects, secondary toggles selection) --- apps/opencs/view/render/instancemode.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/apps/opencs/view/render/instancemode.cpp b/apps/opencs/view/render/instancemode.cpp index fdd031ad4..8f0526443 100644 --- a/apps/opencs/view/render/instancemode.cpp +++ b/apps/opencs/view/render/instancemode.cpp @@ -41,18 +41,18 @@ void CSVRender::InstanceMode::secondaryEditPressed (osg::ref_ptr tag) void CSVRender::InstanceMode::primarySelectPressed (osg::ref_ptr tag) { + getWorldspaceWidget().clearSelection (Element_Reference); + if (tag) { if (CSVRender::ObjectTag *objectTag = dynamic_cast (tag.get())) { - // hit an Object, toggle its selection state + // hit an Object, select it CSVRender::Object* object = objectTag->mObject; - object->setSelected (!object->getSelected()); + object->setSelected (true); return; } } - - getWorldspaceWidget().clearSelection (Element_Reference); } void CSVRender::InstanceMode::secondarySelectPressed (osg::ref_ptr tag) @@ -67,6 +67,4 @@ void CSVRender::InstanceMode::secondarySelectPressed (osg::ref_ptr tag) return; } } - - getWorldspaceWidget().clearSelection (Element_Reference); }