From 9f12b59a91fbdc08925bdd1c2f6e4d6b535e3d7b Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Sun, 13 Aug 2006 17:39:36 +0000 Subject: [PATCH] Fix bug 2179 * controllers/ControlErrorList.h (unreadlist_): new member, tells whether the errorlist has been read by the dialog. * controllers/ControlErrorList.C (errorList, initialiseParams): update unreadlist_ as needed. * qt2/QErrorList.C (update_contents): do nothing if error list has not been updated (bug 2179). * xforms/FormErrorList.C (update): do not call updateContents if the error list has not been updated (bug 2179). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@14655 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/controllers/ChangeLog | 8 ++++++++ src/frontends/controllers/ControlErrorList.C | 12 ++++++++++-- src/frontends/controllers/ControlErrorList.h | 7 ++++++- src/frontends/qt2/ChangeLog | 5 +++++ src/frontends/qt2/QErrorList.C | 4 ++++ src/frontends/xforms/ChangeLog | 5 +++++ src/frontends/xforms/FormErrorList.C | 3 ++- status.14x | 2 ++ 8 files changed, 42 insertions(+), 4 deletions(-) diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog index 7723baa329..74c34dc2f5 100644 --- a/src/frontends/controllers/ChangeLog +++ b/src/frontends/controllers/ChangeLog @@ -1,3 +1,11 @@ +2006-08-13 Jean-Marc Lasgouttes + + * ControlErrorList.h (unreadlist_): new member, tells whether the + errorlist has been read by the dialog. + + * ControlErrorList.C (errorList, initialiseParams): update + unreadlist_ as needed. + 2006-07-04 Bo Peng * tex_helpers.C (rescanTexStyles): invoke the new TeXFiles.py diff --git a/src/frontends/controllers/ControlErrorList.C b/src/frontends/controllers/ControlErrorList.C index 690e52a763..3df214e10f 100644 --- a/src/frontends/controllers/ControlErrorList.C +++ b/src/frontends/controllers/ControlErrorList.C @@ -25,7 +25,7 @@ namespace lyx { namespace frontend { ControlErrorList::ControlErrorList(Dialog & d) - : Dialog::Controller(d) + : Dialog::Controller(d), unreadlist_(true) {} @@ -33,8 +33,9 @@ void ControlErrorList::clearParams() {} -ErrorList const & ControlErrorList::errorList() const +ErrorList const & ControlErrorList::errorList() { + unreadlist_ = false; return errorlist_; } @@ -42,11 +43,18 @@ ErrorList const & ControlErrorList::errorList() const bool ControlErrorList::initialiseParams(string const & name) { errorlist_ = kernel().bufferview()->getErrorList(); + unreadlist_ = true; name_ = name; return true; } +bool ControlErrorList::hasUnreadList() const +{ + return unreadlist_; +} + + string const & ControlErrorList::name() { return name_; diff --git a/src/frontends/controllers/ControlErrorList.h b/src/frontends/controllers/ControlErrorList.h index 17d3ec1a41..5f36c02a81 100644 --- a/src/frontends/controllers/ControlErrorList.h +++ b/src/frontends/controllers/ControlErrorList.h @@ -38,12 +38,17 @@ public: /// return the parent document name std::string const & name(); /// - ErrorList const & errorList() const; + ErrorList const & errorList(); + /// return true when the error list has been updated, but + /// \c errorlist() has not been called. + bool hasUnreadList() const; private: /// ErrorList errorlist_; /// std::string name_; + /// + bool unreadlist_; }; } // namespace frontend diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index 8af86efeef..7b01f41f48 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,8 @@ +2006-08-13 Jean-Marc Lasgouttes + + * QErrorList.C (update_contents): do nothing if error list has not + been updated (bug 2179). + 2006-07-13 Jean-Marc Lasgouttes * QContentPane.C (q_key_state): allow both Alt and Meta as alt diff --git a/src/frontends/qt2/QErrorList.C b/src/frontends/qt2/QErrorList.C index 639510f733..180827532f 100644 --- a/src/frontends/qt2/QErrorList.C +++ b/src/frontends/qt2/QErrorList.C @@ -47,6 +47,10 @@ void QErrorList::select(int item) void QErrorList::update_contents() { + // is there something to do? + if (!controller().hasUnreadList()) + return; + setTitle(controller().name()); dialog_->errorsLB->clear(); dialog_->descriptionTB->setText(QString()); diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 419c70cde6..f3dc082381 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,8 @@ +2006-08-13 Jean-Marc Lasgouttes + + * FormErrorList.C (update): do not call updateContents if the + error list has not been updated (bug 2179). + 2006-06-27 Martin Vermeer * FormSpellchecker.C (update): fix bug 2218: Spellchecker doesn't diff --git a/src/frontends/xforms/FormErrorList.C b/src/frontends/xforms/FormErrorList.C index 20b6db069b..b136a43b76 100644 --- a/src/frontends/xforms/FormErrorList.C +++ b/src/frontends/xforms/FormErrorList.C @@ -44,7 +44,8 @@ void FormErrorList::build() void FormErrorList::update() { setTitle(controller().name()); - updateContents(); + if (controller().hasUnreadList()) + updateContents(); } diff --git a/status.14x b/status.14x index 2fafb2b362..50841c6f1e 100644 --- a/status.14x +++ b/status.14x @@ -60,6 +60,8 @@ What's new - Fix lockup when accepting a change in a text inset (bug 2510). +- Fix editing of document while Error List dialog is open (bug 2179). + - Update labels on screen when changing language. - Show an error box when failing to update the TeX Information dalog data.