[Uml-devel] kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Mon Nov 3 12:27:48 UTC 2003


CVS commit by okellogg: 

removeUMLObject(): Revoke membership at containing package.


  M +31 -26    umldoc.cpp   1.92


--- kdesdk/umbrello/umbrello/umldoc.cpp  #1.91:1.92
@@ -152,8 +152,11 @@ void UMLDoc::slotUpdateAllViews(UMLView 
 bool UMLDoc::saveModified() {
         bool completed(true);
+        if (!m_modified)
+                return completed;
 
-        if(m_modified) {
                 UMLApp *win=(UMLApp *) parent();
-                int want_save = KMessageBox::warningYesNoCancel(win, i18n("The current file has been modified.\nDo you want to save it?"), i18n("Warning"));
+        int want_save = KMessageBox::warningYesNoCancel( win,
+                                i18n("The current file has been modified.\n"
+                                     "Do you want to save it?"), i18n("Warning"));
                 switch(want_save) {
                         case KMessageBox::Yes:
@@ -186,5 +189,4 @@ bool UMLDoc::saveModified() {
                                 break;
                 }
-        }
         return completed;
 }
@@ -1183,4 +1185,7 @@ void UMLDoc::removeUMLObject(UMLObject *
                         }
                 }
+                UMLPackage *pkg = o->getUMLPackage();
+                if (pkg)
+                        pkg->removeObject(o);
                 emit sigObjectRemoved(o);
                 objectList.remove(o);






More information about the umbrello-devel mailing list