[Uml-devel] kdesdk/umbrello/umbrello

Jonathan Riddell jri at jriddell.org
Sat Jul 5 10:11:02 UTC 2003


CVS commit by jriddell: 

Partial fix for bug 59774 crash when cutting last diagram left


  M +10 -4     uml.cpp   1.45
  M +3 -0      umlview.cpp   1.60


--- kdesdk/umbrello/umbrello/uml.cpp  #1.44:1.45
@@ -747,4 +747,6 @@ void UMLApp::slotEditRedo() {
 void UMLApp::slotEditCut() {
         slotStatusMsg(i18n("Cutting selection..."));
+        //FIXME bug 59774 this fromview isn't very reliable.
+        //when cutting diagrams it is set to true even though it shouldn't be
         bool  fromview = (doc->getCurrentView() && doc->getCurrentView()->getSelectCount());
         if (!fromview) {
@@ -752,5 +754,5 @@ void UMLApp::slotEditCut() {
                 listView->setStartedCut(true);
         }
-        if( editCutCopy(fromview) ) {
+        if ( editCutCopy(fromview) ) {
                 emit sigCutSuccessful();
                 slotDeleteSelectedWidget();
@@ -1253,5 +1255,9 @@ void UMLApp::slotSelectAll() {
 
 void UMLApp::slotDeleteSelectedWidget() {
+        if ( doc->getCurrentView() ) {
         doc->getCurrentView()->deleteSelection();
+        } else {
+                kdWarning() << k_funcinfo << " trying to delete widgets when there is no current view (see bug 59774)" << endl;
+        }
 }
 

--- kdesdk/umbrello/umbrello/umlview.cpp  #1.59:1.60
@@ -2138,4 +2138,7 @@ void UMLView::removeAllAssociations() {
 
 void UMLView::removeAllWidgets() {
+        //FIXME bug 59774
+        //this queryList returns a too high count and list items which cause the program to crash
+        //when you touch them on diagrams that contain associations /and/ have been saved and loaded
         QObjectList * l = queryList( "UMLWidget");
         QObjectListIt it( *l );






More information about the umbrello-devel mailing list