timebasedviewselectionmanager: fixed bug detecting single click selections

This commit is contained in:
itsmattkc
2023-03-11 13:39:00 -08:00
parent 5413cb5860
commit 9f4124beb3
@@ -107,9 +107,10 @@ public:
T *GetObjectAtPoint(const QPointF &scene_pt)
{
// Iterate in reverse order because the objects drawn later will appear on top to the user
QPointF unscaled = view_->UnscalePoint(scene_pt);
for (auto it=drawn_objects_.crbegin(); it!=drawn_objects_.crend(); it++) {
const DrawnObject &kp = *it;
if (kp.second.contains(scene_pt)) {
if (kp.second.contains(unscaled)) {
return kp.first;
}
}