UI Nits: GcBubble positioning

RideNavigator set the GCBubble to the wrong position on
screen which can be confusing when you have a narrow list
of rides. The bubble appeared to be displaying for a totally
different ride.
This commit is contained in:
Mark Liversedge
2012-11-30 10:27:23 +00:00
parent b1729525c2
commit cce5b9c590

View File

@@ -499,13 +499,9 @@ RideNavigator::eventFilter(QObject *object, QEvent *e)
if (index.isValid()) {
QString hoverFileName = tableView->model()->data(index, Qt::UserRole+1).toString();
e->accept();
// XXX todo custom tooltip balloon here.
// remember to make it hide when mouse moves again.
// or another tooltip event occurs
// qDebug()<<"ride navigator tooltip"<<hoverFileName;
QPoint p = dynamic_cast<QHelpEvent*>(e)->pos();
QPoint p = local;
p.setX(width()-20);
main->setBubble(hoverFileName, mapToGlobal(p));
main->setBubble(hoverFileName, tableView->viewport()->mapToGlobal(p));
}
}
break;