From c28b128239ade7358970fc1c8bc806aafcc9930d Mon Sep 17 00:00:00 2001 From: dvlierop2 Date: Fri, 6 Jul 2007 10:37:44 +0000 Subject: [PATCH] Fix for bug #1740146: always get current namedview, because it might have changed when multiple documents are open --- src/ui/widget/registered-widget.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ui/widget/registered-widget.cpp b/src/ui/widget/registered-widget.cpp index 7869a1f72..45ff46dc6 100644 --- a/src/ui/widget/registered-widget.cpp +++ b/src/ui/widget/registered-widget.cpp @@ -93,8 +93,10 @@ RegisteredCheckButton::on_toggled() SPDocument *doc = sp_desktop_document(dt); - if (!repr) - repr = SP_OBJECT_REPR (sp_desktop_namedview(dt)); + //always get the obj.repr. of the current view, as the focus + //might have changed when multiple documents are open. Never + //use the old value of "repr" here + repr = SP_OBJECT_REPR (sp_desktop_namedview(dt)); _wr->setUpdating (true); -- 2.30.2