[Uml-devel] branches/KDE/3.5/kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Tue Aug 2 13:11:03 UTC 2005


SVN commit 442484 by okellogg:

slotCurrentViewChanged(): Prevent error messages about "no such signal
 QObject::sigShowGridToggled()" or "... sigSnapToGridToggled".
Still this code need more reworking.


 M  +6 -3      uml.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/uml.cpp #442483:442484
@@ -1426,10 +1426,13 @@
 }
 
 void UMLApp::slotCurrentViewChanged() {
-    if ( m_doc->getCurrentView() ) {
-        connect(m_doc->getCurrentView(), SIGNAL( sigShowGridToggled(bool) ),
+    UMLView *viewAtDoc = m_doc->getCurrentView();
+    // FIXME: This whole business of UMLDoc::getCurrentView() vs.
+    //        UMLApp::getCurrentView() is a shame.
+    if (viewAtDoc) {
+        connect(viewAtDoc, SIGNAL( sigShowGridToggled(bool) ),
                 this, SLOT( slotShowGridToggled(bool) ) );
-        connect(m_doc->getCurrentView(), SIGNAL( sigSnapToGridToggled(bool) ),
+        connect(viewAtDoc, SIGNAL( sigSnapToGridToggled(bool) ),
                 this, SLOT( slotSnapToGridToggled(bool) ) );
     }
 }




More information about the umbrello-devel mailing list