]> git.tdb.fi Git - libs/gltk.git/commitdiff
If the active list item is refreshed, mark it as such
authorMikko Rasa <tdb@tdb.fi>
Thu, 13 Nov 2014 21:46:59 +0000 (23:46 +0200)
committerMikko Rasa <tdb@tdb.fi>
Thu, 13 Nov 2014 21:46:59 +0000 (23:46 +0200)
source/list.cpp

index 83af9320aec7e6c093b8f31bb2e58bd0b9b12498..10c5af84ab100ef8591a1215b6113868657c8f60 100644 (file)
@@ -123,6 +123,8 @@ List::Item *List::create_item(unsigned index)
                item = item_factory->create_item(index);
        else
                item = new BasicItem(data->get_string(index));
+       if(static_cast<int>(index)==sel_index)
+               item->set_active(true);
        add(*item);
        item->autosize();
        item->signal_autosize_changed.connect(sigc::bind(sigc::mem_fun(this, &List::item_autosize_changed), item));