diff --git a/src/frontends/gtk/ChangeLog b/src/frontends/gtk/ChangeLog index 0b51fc80bf..9316c350d1 100644 --- a/src/frontends/gtk/ChangeLog +++ b/src/frontends/gtk/ChangeLog @@ -1,3 +1,8 @@ +2005-03-04 John Spray + + * GToolbar.C: remember existing selection when update()ing + the layoutbox, in order to cope with document class changes. + 2005-01-29 Georg Baum * GPrint.C (apply): use convert to avoid undefined diff --git a/src/frontends/gtk/GToolbar.C b/src/frontends/gtk/GToolbar.C index 47c9f5162b..11fd48d803 100644 --- a/src/frontends/gtk/GToolbar.C +++ b/src/frontends/gtk/GToolbar.C @@ -118,10 +118,10 @@ void GLayoutBox::set(string const & layout) 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(); @@ -132,6 +132,7 @@ void GLayoutBox::update() 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