Commit 3ca708a4 authored by Edwin Carlinet's avatar Edwin Carlinet
Browse files

Fix scene event issues.

	* mln/qt/mainwin.cpp: fix mouse events.
parent cd6f47be
......@@ -62,8 +62,9 @@ namespace mln
{
QGraphicsSceneMouseEvent* event = static_cast<QGraphicsSceneMouseEvent*>(ev);
QPointF p_ = m_pixmap.mapFromScene(event->scenePos());
if (m_scene->sceneRect().contains(p_)) {
point2d p = { p_.y(), p_.x() };
point2d p = { p_.y(), p_.x() };
if (m_ima->getView().domain().has(p)) {
std::cout << p << std::endl;
emit pointHover(p);
return true;
}
......@@ -72,8 +73,9 @@ namespace mln
{
QGraphicsSceneMouseEvent* event = static_cast<QGraphicsSceneMouseEvent*>(ev);
QPointF p_ = m_pixmap.mapFromScene(event->scenePos());
if (m_scene->sceneRect().contains(p_)) {
point2d p = { p_.y(), p_.x() };
point2d p = { p_.y(), p_.x() };
if (m_ima->getView().domain().has(p)) {
std::cout << p << std::endl;
emit pointSelected(p);
return true;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment