]> git.lyx.org Git - features.git/commitdiff
Fix the warning message "TocModel.cpp: type not found" when (re-)loading a file.
authorVincent van Ravesteijn <vfr@lyx.org>
Tue, 1 Jun 2010 09:56:07 +0000 (09:56 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Tue, 1 Jun 2010 09:56:07 +0000 (09:56 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34571 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/TocWidget.cpp

index 59c788f69bb73aeb0e85aee3903857170a258c92..be4c9c7696adc5cda0af02bb524bb7c660bdfc9b 100644 (file)
@@ -314,6 +314,8 @@ void TocWidget::setTreeDepth(int depth)
 
 void TocWidget::on_typeCO_currentIndexChanged(int index)
 {
+       if (index == -1)
+               return;
        current_type_ = typeCO->itemData(index).toString();
        updateView();
        if (typeCO->hasFocus())