when updating, such as on a change of document class.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9691
a592a061-630c-0410-9148-
cb99ea01b6c8
+2005-03-04 John Spray <spray_john@users.sf.net>
+
+ * GToolbar.C: remember existing selection when update()ing
+ the layoutbox, in order to cope with document class changes.
+
2005-01-29 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* GPrint.C (apply): use convert<int, string> to avoid undefined
void GLayoutBox::update()
{
+ int current_selection = combo_.get_active_row_number();
clear();
LyXTextClass const & tc = getTextClass(owner_);
-
LyXTextClass::const_iterator it = tc.begin();
LyXTextClass::const_iterator const end = tc.end();
Gtk::TreeModel::Row row = *iter;
row[cols_.name] = Glib::locale_to_utf8((*it)->name());
}
+ combo_.set_active(current_selection);
internal_ = false;
// now that we've loaded something into the combobox, forget