]> git.tdb.fi Git - libs/gltk.git/commitdiff
Always set column widths on the item itself
authorMikko Rasa <tdb@tdb.fi>
Wed, 12 Mar 2014 19:20:11 +0000 (21:20 +0200)
committerMikko Rasa <tdb@tdb.fi>
Wed, 12 Mar 2014 19:20:11 +0000 (21:20 +0200)
A newly created item gets parented to the List before it appears in its
item array.  As such, the loop inside the if block won't reach it.

source/list.cpp

index f42d573866317c643473e8b678e76cf543a677a5..1b26a3ff7b20055ee7e773d585d86e09dab42371 100644 (file)
@@ -413,8 +413,8 @@ void List::MultiColumnItem::on_style_change()
                        if(MultiColumnItem *mci = dynamic_cast<MultiColumnItem *>(*i))
                                mci->set_widths(self_widths);
        }
-       else
-               set_widths(self_widths);
+
+       set_widths(self_widths);
 }