]> git.lyx.org Git - features.git/commitdiff
Fix broken updating of TOC
authorAsger Ottar Alstrup <alstrup@lyx.org>
Sun, 29 Jul 2001 11:57:09 +0000 (11:57 +0000)
committerAsger Ottar Alstrup <alstrup@lyx.org>
Sun, 29 Jul 2001 11:57:09 +0000 (11:57 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2383 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/xforms/ChangeLog
src/frontends/xforms/FormToc.C

index 19e2f9ab326b93fb15d63b3769a1ff713915154d..91f207901adb17e300d79d963b1b58a672e1e06e 100644 (file)
@@ -1,3 +1,8 @@
+2001-07-29  Asger Alstrup Nielsen  <alstrup@alstrup>
+
+       * FormToc.C (updateType): Fix problem with TOC that couldn't be
+       updated because the type list was not updated.
+
 2001-07-26  Angus Leeming  <a.leeming@ic.ac.uk>
 
        * forms/form_aboutlyx.fd: made a bit bigger to get the Copyright &
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);