forked from teamnwah/openmw-tes3coop
changed instance selection model (primary selects, secondary toggles selection)
This commit is contained in:
parent
ad4e0e3b97
commit
655b40267b
1 changed files with 4 additions and 6 deletions
|
@ -41,18 +41,18 @@ void CSVRender::InstanceMode::secondaryEditPressed (osg::ref_ptr<TagBase> tag)
|
||||||
|
|
||||||
void CSVRender::InstanceMode::primarySelectPressed (osg::ref_ptr<TagBase> tag)
|
void CSVRender::InstanceMode::primarySelectPressed (osg::ref_ptr<TagBase> tag)
|
||||||
{
|
{
|
||||||
|
getWorldspaceWidget().clearSelection (Element_Reference);
|
||||||
|
|
||||||
if (tag)
|
if (tag)
|
||||||
{
|
{
|
||||||
if (CSVRender::ObjectTag *objectTag = dynamic_cast<CSVRender::ObjectTag *> (tag.get()))
|
if (CSVRender::ObjectTag *objectTag = dynamic_cast<CSVRender::ObjectTag *> (tag.get()))
|
||||||
{
|
{
|
||||||
// hit an Object, toggle its selection state
|
// hit an Object, select it
|
||||||
CSVRender::Object* object = objectTag->mObject;
|
CSVRender::Object* object = objectTag->mObject;
|
||||||
object->setSelected (!object->getSelected());
|
object->setSelected (true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getWorldspaceWidget().clearSelection (Element_Reference);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSVRender::InstanceMode::secondarySelectPressed (osg::ref_ptr<TagBase> tag)
|
void CSVRender::InstanceMode::secondarySelectPressed (osg::ref_ptr<TagBase> tag)
|
||||||
|
@ -67,6 +67,4 @@ void CSVRender::InstanceMode::secondarySelectPressed (osg::ref_ptr<TagBase> tag)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getWorldspaceWidget().clearSelection (Element_Reference);
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue