Merge pull request #786 from rokuz/fixed-qt-menu-pos

Fixed right button's menu position in Qt app
This commit is contained in:
Konstantin Shalnev 2015-12-01 13:36:23 +03:00
commit 959dbce5af
2 changed files with 4 additions and 4 deletions

View file

@ -329,7 +329,7 @@ void DrawWidget::mousePressEvent(QMouseEvent * e)
}
}
else if (IsRightButton(e))
ShowInfoPopup(pt);
ShowInfoPopup(e, pt);
}
void DrawWidget::mouseDoubleClickEvent(QMouseEvent * e)
@ -461,7 +461,7 @@ void DrawWidget::SubmitRoutingPoint(m2::PointD const & pt)
m_framework->BuildRoute(m_framework->PtoG(pt), 0 /* timeoutSec */);
}
void DrawWidget::ShowInfoPopup(m2::PointD const & pt)
void DrawWidget::ShowInfoPopup(QMouseEvent * e, m2::PointD const & pt)
{
// show feature types
QMenu menu;
@ -487,7 +487,7 @@ void DrawWidget::ShowInfoPopup(m2::PointD const & pt)
addStringFn(info.FormatAddress());
addStringFn(info.FormatTypes());
menu.exec();
menu.exec(e->pos());
}
void DrawWidget::OnViewportChanged(ScreenBase const & screen)

View file

@ -88,7 +88,7 @@ namespace qt
private:
void SubmitFakeLocationPoint(m2::PointD const & pt);
void SubmitRoutingPoint(m2::PointD const & pt);
void ShowInfoPopup(m2::PointD const & pt);
void ShowInfoPopup(QMouseEvent * e, m2::PointD const & pt);
void OnViewportChanged(ScreenBase const & screen);
void UpdateScaleControl();