Skip to content

Commit

Permalink
Fix transform controls (gazebosim#1081)
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <[email protected]>
  • Loading branch information
chapulina authored and srmainwaring committed Nov 4, 2021
1 parent 3127b42 commit 9c482c2
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/gui/plugins/transform_control/TransformControl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,20 @@ bool TransformControl::eventFilter(QObject *_obj, QEvent *_event)
this->dataPtr->mouseEvent = _e->Mouse();
this->dataPtr->mouseDirty = true;
}
else if (_event->type() == ignition::gui::events::MousePressOnScene::kType)
{
auto event =
static_cast<ignition::gui::events::MousePressOnScene *>(_event);
this->dataPtr->mouseEvent = event->Mouse();
this->dataPtr->mouseDirty = true;
}
else if (_event->type() == ignition::gui::events::DragOnScene::kType)
{
auto event =
static_cast<ignition::gui::events::DragOnScene *>(_event);
this->dataPtr->mouseEvent = event->Mouse();
this->dataPtr->mouseDirty = true;
}
else if (_event->type() == ignition::gui::events::KeyPressOnScene::kType)
{
ignition::gui::events::KeyPressOnScene *_e =
Expand Down Expand Up @@ -589,7 +603,8 @@ void TransformControlPrivate::HandleTransform()
// start the transform process
this->transformControl.SetActiveAxis(axis);
this->transformControl.Start();
if (this->transformControl.Node()){
if (this->transformControl.Node())
{
try
{
this->transformControl.Node()->SetUserData(
Expand Down

0 comments on commit 9c482c2

Please sign in to comment.