From 40751c033d5482d5dd56cd83f2f4e130dbb102f7 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 26 Mar 2025 09:09:16 +1100 Subject: Make sure captures are taken into account when comparing selections sel1 == sel2 was using BasicSelection::operator==, ignoring captures, which led to selection history deciding that selection did not change in some cases where only the captures had been updated and for the new selection not to be properly applied, leading to missing capture. --- src/selection.hh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/selection.hh b/src/selection.hh index ede4fa7b..6b07e9f8 100644 --- a/src/selection.hh +++ b/src/selection.hh @@ -67,6 +67,8 @@ struct Selection : BasicSelection CaptureList& captures() { return m_captures; } const CaptureList& captures() const { return m_captures; } + friend bool operator==(const Selection&, const Selection&) = default; + private: CaptureList m_captures; }; -- cgit v1.2.3