]> git.lyx.org Git - features.git/commitdiff
fix bug with ever-growing bst files list (from herbert)
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 25 Jul 2002 12:07:26 +0000 (12:07 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 25 Jul 2002 12:07:26 +0000 (12:07 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4783 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/xforms/ChangeLog
src/frontends/xforms/FormBibtex.C

index a057748857d868ca8c66ebe972f190913b114497..33173d8e8bd689f14fce0b276c1bc558cb625449 100644 (file)
@@ -1,3 +1,7 @@
+2002-07-25  Herbert Voss  <voss@perce.de>
+
+       * FormBibtex.C (update): clear browser first
+
 2002-07-25  Juergen Vigna  <jug@sad.it>
 
        * XWorkArea.C (work_area_handler): set y_old and x_old to some
index 4e2bb28ac105a32a1afbbe8d7a69df552c830926..6ec95c50ebc115f272b73732dbecad0f83f37654 100644 (file)
@@ -120,8 +120,13 @@ ButtonPolicy::SMInput FormBibtex::input(FL_OBJECT * ob, long)
                        fl_get_browser_line(dialog_->browser_styles, selection);
                fl_set_input(dialog_->input_style,
                        ChangeExtension(out_name, string()).c_str());
-       } else if (ob == dialog_->button_rescan)
+       } else if (ob == dialog_->button_rescan) {
+               fl_clear_browser(dialog_->browser_styles);
                controller().rescanBibStyles();
+               string const str =
+                       controller().getBibStyles();
+               fl_add_browser_line(dialog_->browser_styles, str.c_str());
+       }
 
        // with an empty database nothing makes sense ...
        if (!compare(fl_get_input(dialog_->input_database), "")) {
@@ -152,6 +157,7 @@ void FormBibtex::update()
                fl_set_button(dialog_->check_bibtotoc,0);
                fl_set_input(dialog_->input_style, bibstyle.c_str());
        }
+       fl_clear_browser(dialog_->browser_styles);
        string const str =
                controller().getBibStyles();
        fl_add_browser_line(dialog_->browser_styles, str.c_str());