Fix bug 2038 for all three frontends (gtk untested)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10506 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Martin Vermeer 2005-10-02 16:35:56 +00:00
parent 8f9344cb9f
commit 3752f82762
6 changed files with 22 additions and 3 deletions

View 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

View 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.

View 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.

View 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);

View 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

View 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,