From b4791d97b38098d044f8285946e9c9c91e14cf3f Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Fri, 26 Mar 2010 16:36:29 +0000 Subject: [PATCH] Fix another potential manifestation of bug #6522. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33873 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/TocModel.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/frontends/qt4/TocModel.cpp b/src/frontends/qt4/TocModel.cpp index 4ace85c7a8..870b9242da 100644 --- a/src/frontends/qt4/TocModel.cpp +++ b/src/frontends/qt4/TocModel.cpp @@ -33,7 +33,7 @@ using namespace std; namespace lyx { namespace frontend { -/// A QStandardItemModel that gives access to the reset method. +/// A QStandardItemModel that gives access to the reset methods. /// This is needed in order to fix http://www.lyx.org/trac/ticket/3740 class TocTypeModel : public QStandardItemModel { @@ -41,7 +41,6 @@ public: /// TocTypeModel(QObject * parent) : QStandardItemModel(parent) {} - /// void reset() { @@ -60,7 +59,7 @@ public: #if QT_VERSION >= 0x040600 QStandardItemModel::endResetModel(); #else - reset(); + QStandardItemModel::reset(); #endif } }; @@ -163,6 +162,7 @@ void TocModel::reset(Toc const & toc) } model_->blockSignals(true); + model_->beginResetModel(); model_->insertColumns(0, 1); maxdepth_ = 0; mindepth_ = INT_MAX; @@ -190,7 +190,7 @@ void TocModel::reset(Toc const & toc) if (is_sorted_) sorted_model_->sort(0); model_->blockSignals(false); - reset(); + model_->endResetModel(); // emit headerDataChanged(); } -- 2.39.2