Skip to content

Commit

Permalink
Merge 75efa37 into 72e1066
Browse files Browse the repository at this point in the history
  • Loading branch information
ahcorde authored Sep 21, 2021
2 parents 72e1066 + 75efa37 commit f2a8560
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/plugins/minimal_scene/MinimalScene.cc
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,8 @@ void IgnRenderer::BroadcastRightClick()

events::RightClickToScene rightClickToSceneEvent(pos);
App()->sendEvent(App()->findChild<MainWindow *>(), &rightClickToSceneEvent);
events::RightClickOnScene rightClickOnSceneEvent(this->dataPtr->mouseEvent);
App()->sendEvent(App()->findChild<MainWindow *>(), &rightClickOnSceneEvent);
}


Expand Down Expand Up @@ -1051,9 +1053,9 @@ void RenderWindowItem::OnDropped(const QString &_drop,
/////////////////////////////////////////////////
void RenderWindowItem::mousePressEvent(QMouseEvent *_e)
{
auto event = convert(*_e);
event.SetPressPos(event.Pos());
this->dataPtr->mouseEvent = event;
auto pressPos = this->dataPtr->mouseEvent.PressPos();
this->dataPtr->mouseEvent = convert(*_e);
this->dataPtr->mouseEvent.SetPressPos(pressPos);

this->dataPtr->renderThread->ignRenderer.NewMouseEvent(
this->dataPtr->mouseEvent);
Expand Down Expand Up @@ -1083,6 +1085,7 @@ void RenderWindowItem::keyReleaseEvent(QKeyEvent *_e)
void RenderWindowItem::mouseReleaseEvent(QMouseEvent *_e)
{
this->dataPtr->mouseEvent = convert(*_e);
this->dataPtr->mouseEvent.SetPressPos(_e->pos().x(), _e->pos().y());

this->dataPtr->renderThread->ignRenderer.NewMouseEvent(
this->dataPtr->mouseEvent);
Expand Down

0 comments on commit f2a8560

Please sign in to comment.