]> git.lyx.org Git - features.git/commitdiff
Fix bug 2038 for all three frontends (gtk untested)
authorMartin Vermeer <martin.vermeer@hut.fi>
Sun, 2 Oct 2005 16:35:56 +0000 (16:35 +0000)
committerMartin Vermeer <martin.vermeer@hut.fi>
Sun, 2 Oct 2005 16:35:56 +0000 (16:35 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10506 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/gtk/ChangeLog
src/frontends/gtk/GToc.C
src/frontends/qt2/ChangeLog
src/frontends/qt2/QToc.C
src/frontends/xforms/ChangeLog
src/frontends/xforms/FormToc.C

index 56b3ec72cdc4cc128e1d20ede33235b4a106a27c..bbcd86747437491f1bd78c0d8857ceb3a0fb7056 100644 (file)
@@ -1,3 +1,7 @@
+2005-10-02  Martin Vermeer  <martin.vermeer@hut.fi>
+
+       * GToc.C: fix bug 2038
+
 2005-09-08  Angus Leeming  <leeming@lyx.org>
 
        * GSpellchecker.C: correct grammar describing invocation of the
index 19c0876b718925689a664828da0c1b5fafb13fc2..3ff57bbc80e58222d172f19eda77e5ed39232fb7 100644 (file)
@@ -126,7 +126,10 @@ void GToc::updateContents()
 
        Gtk::TreeModel::iterator it = typecombo_->get_active();
        vector<string> const & choice = controller().getTypes();
-       string const type = choice[(*it)[listColIndex_]];
+       // Untested:
+       string type;
+       if (!choice.empty())
+               type = choice[(*it)[listColIndex_]];
        toc::Toc const contents = controller().getContents(type);
 
        // Check if all elements are the same.
index 3045db8242c52be786684a96861d7ce98d74279e..833aedb6aaa45063ae00bf6188feab3062d4d55f 100644 (file)
@@ -1,3 +1,7 @@
+2005-10-02  Martin Vermeer  <martin.vermeer@hut.fi>
+
+       * QToc.C: fix bug 2038  
+
 2005-09-15  Jürgen Spitzmüller  <j.spitzmueller@gmx.de>
 
        * QTabular.C: disable newpageCB when !longtabular.
index c76da192f481cbc3ba7a4c220660058004e3af7d..b3c5f7982758ad8c2e44b290bcc54c03d61a5efd 100644 (file)
@@ -80,7 +80,9 @@ void QToc::update_contents()
 void QToc::updateToc(int newdepth)
 {
        vector<string> const & choice = controller().getTypes();
-       string const & type = choice[dialog_->typeCO->currentItem()];
+       string type;
+       if (!choice.empty())
+               type = choice[dialog_->typeCO->currentItem()];
 
        toc::Toc const & contents = controller().getContents(type);
 
index 344a7a100607dc70f4d7f1c58132f5713e4fdd13..b7dd764eb7d19db3c4ec00b213bc826cae94eb0f 100644 (file)
@@ -1,3 +1,7 @@
+2005-10-02  Martin Vermeer  <martin.vermeer@hut.fi>
+
+       * FormToc.C: fix bug 2038
+
 2005-09-15  Jürgen Spitzmüller  <j.spitzmueller@gmx.de>
 
        * FormCitation.C (findBiblio): correct start iterator when 
index 7feec7f18e4b696198756b698bdca349cd1c3f0e..23cbcdabfba2804395ff8bc1ddac7de0f63e5f60 100644 (file)
@@ -100,7 +100,9 @@ void FormToc::updateType()
 void FormToc::updateContents()
 {
        vector<string> types = controller().getTypes();
-       string const type = types[fl_get_choice(dialog_->choice_toc_type) - 1];
+       string type;
+       if (!types.empty())
+               type = types[fl_get_choice(dialog_->choice_toc_type) - 1];
        if (type.empty()) {
                fl_clear_browser(dialog_->browser_toc);
                fl_add_browser_line(dialog_->browser_toc,