From: Mikko Rasa Date: Thu, 13 Nov 2014 21:46:59 +0000 (+0200) Subject: If the active list item is refreshed, mark it as such X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=22e2888b01b7b9d0a8df568f25dbe06addd51710;p=libs%2Fgltk.git If the active list item is refreshed, mark it as such --- diff --git a/source/list.cpp b/source/list.cpp index 83af932..10c5af8 100644 --- a/source/list.cpp +++ b/source/list.cpp @@ -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(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));