Commit bd626d95 authored by Méven Car's avatar Méven Car

ScreenshotEffect: fix lookup of ComparableQPoint keys in QMap

QMap::value() failed to find existing keys when tow ComparablePoint
shared the same x but not the same y.

This commit improves the operator<() to fix that.
parent 57086c34
......@@ -48,7 +48,7 @@ public:
// utility class that allows using QMap to sort its keys when they are QPoint
// so that the bottom and right points are after the top left ones
bool operator<(const ComparableQPoint &other) const {
return x() < other.x() || y() < other.y();
return x() < other.x() || (x() == other.x() && y() < other.y());
}
};
......
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