Code

Fix for bug #1740146: always get current namedview, because it might have changed...
authordvlierop2 <dvlierop2@users.sourceforge.net>
Fri, 6 Jul 2007 10:37:44 +0000 (10:37 +0000)
committerdvlierop2 <dvlierop2@users.sourceforge.net>
Fri, 6 Jul 2007 10:37:44 +0000 (10:37 +0000)
src/ui/widget/registered-widget.cpp

index 7869a1f72da94d39fee074628b9455b54a01f02d..45ff46dc6ab37f6d759c3f46e437e4fe13df577b 100644 (file)
@@ -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);