From 5808c6e78f9260b82e2127a00676dd0f68b189cf Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 5 Nov 2024 14:55:37 -0700 Subject: [PATCH] Canvas: fix logic bug when setting child items to be layout sensitive Also, auto-fy the loop --- libs/canvas/item.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libs/canvas/item.cc b/libs/canvas/item.cc index 354dfeb1d9..c301305b84 100644 --- a/libs/canvas/item.cc +++ b/libs/canvas/item.cc @@ -1337,10 +1337,8 @@ Item::set_layout_sensitive (bool yn) { _layout_sensitive = yn; - for (list::const_iterator i = _items.begin(); i != _items.end(); ++i) { - if (!(*i)->layout_sensitive()) { - (*i)->set_layout_sensitive (yn); - } + for (auto & item : _items) { + item->set_layout_sensitive (yn); } }