clear instance selection on select click on nothing/something that isn't an instance

sceneinput
Marc Zinnschlag 9 years ago
parent 319e3f24a3
commit f28fa9fc16

@ -2,6 +2,11 @@
#include "worldspacewidget.hpp"
CSVRender::WorldspaceWidget& CSVRender::EditMode::getWorldspaceWidget()
{
return *mWorldspaceWidget;
}
CSVRender::EditMode::EditMode (WorldspaceWidget *worldspaceWidget, const QIcon& icon,
unsigned int mask, const QString& tooltip, QWidget *parent)
: ModeButton (icon, tooltip, parent), mWorldspaceWidget (worldspaceWidget), mMask (mask)

@ -17,6 +17,10 @@ namespace CSVRender
WorldspaceWidget *mWorldspaceWidget;
unsigned int mMask;
protected:
WorldspaceWidget& getWorldspaceWidget();
public:
EditMode (WorldspaceWidget *worldspaceWidget, const QIcon& icon, unsigned int mask,

@ -3,6 +3,7 @@
#include "elements.hpp"
#include "object.hpp"
#include "worldspacewidget.hpp"
CSVRender::InstanceMode::InstanceMode (WorldspaceWidget *worldspaceWidget, QWidget *parent)
: EditMode (worldspaceWidget, QIcon (":placeholder"), Element_Reference, "Instance editing",
@ -30,6 +31,9 @@ void CSVRender::InstanceMode::selectPressed (osg::ref_ptr<TagBase> tag)
// hit an Object, toggle its selection state
CSVRender::Object* object = objectTag->mObject;
object->setSelected (!object->getSelected());
return;
}
}
getWorldspaceWidget().clearSelection (Element_Reference);
}

Loading…
Cancel
Save