]> git.lyx.org Git - features.git/blobdiff - src/frontends/xforms/FormToc.C
Fix broken updating of TOC
[features.git] / src / frontends / xforms / FormToc.C
index 8691bfa3b2986fb4a3f40493acb27dc75d7dfa84..b9d0a11745b5d6a8ca74a5ec6e3ec8010e0d282b 100644 (file)
@@ -71,6 +71,13 @@ ButtonPolicy::SMInput FormToc::input(FL_OBJECT *, long)
 
 void FormToc::updateType()
 {
+       // Update the choice list from scratch
+       fl_clear_choice(dialog_->choice_toc_type);
+       string const choice =
+               " " + getStringFromVector(controller().getTypes(), " | ") + " ";
+       fl_addto_choice(dialog_->choice_toc_type, choice.c_str());
+
+       // And select the correct one
        string const type = toc::getType(controller().params().getCmdName());
        
        fl_set_choice(dialog_->choice_toc_type, 1);