]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormCitation.C
Bugfixes: checkboxes to radiobuttons (from J�rgen S) and remove a little
[lyx.git] / src / frontends / xforms / FormCitation.C
index 6ad5f47e495e0095a78722a6402f71d7dab72f5a..ac5ad5ccd306a98d593b6151accaee1e1261126d 100644 (file)
@@ -48,6 +48,15 @@ int string_width(string const & str)
 
 void fillChoice(FD_form_citation * dialog, vector<string> vec)
 {
+       // Check whether the current contents of the browser will be
+       // changed by loading the contents of the vec...
+       vector<string> const choice_style =
+               getVectorFromChoice(dialog->choice_style);
+
+       if (vec == choice_style)
+               return;
+
+       // They will be changed. Proceed
        string const str = " " + getStringFromVector(vec, " | ") + " ";
 
        fl_clear_choice(dialog->choice_style);
@@ -101,7 +110,7 @@ void updateStyle(FD_form_citation * dialog, string command)
 typedef FormCB<ControlCitation, FormDB<FD_form_citation> > base_class;
 
 FormCitation::FormCitation(ControlCitation & c)
-       : base_class(c, _("Citation"))
+       : base_class(c, _("Citation"), false)
 {}
 
 
@@ -413,6 +422,14 @@ void FormCitation::update()
 void FormCitation::updateBrowser(FL_OBJECT * browser,
                                 vector<string> const & keys) const
 {
+       // Check whether the current contents of the browser will be
+       // changed by loading the contents of the vec...
+       vector<string> browser_keys = getVectorFromBrowser(browser);
+
+       if (browser_keys == keys)
+               return;
+
+       // They will be changed. Proceed.
        fl_clear_browser(browser);
 
        for (vector<string>::const_iterator it = keys.begin();