Summary: | Crash when changing the association type to containment | ||
---|---|---|---|
Product: | [Applications] umbrello | Reporter: | Dmitri Fedoruk <dfedoruk> |
Component: | general | Assignee: | Umbrello Development Group <umbrello-devel> |
Status: | RESOLVED FIXED | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Dmitri Fedoruk
2007-06-25 15:52:12 UTC
SVN commit 680735 by okellogg: mouseReleaseEvent(): Temporarily disallow ListPopupMenu for m_pObject types other than Uml::ot_Association until somebody finds time to implement that. Implementation would require certain controls in AssocPropDlg to be made read-only for non-ot_Association types of m_pObject. BUG:147202 M +1 -0 ChangeLog M +2 -0 umbrello/associationwidget.cpp --- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #680734:680735 @@ -6,6 +6,7 @@ * Crash when linking to undefined xmi.id (146748) * End Activity Symbol gets invalid when line thickness is increased (146925) * The size of a fork/join is not restored (147069) +* Crash when changing the association type to containment (147202) Version 1.5.71 --- branches/KDE/3.5/kdesdk/umbrello/umbrello/associationwidget.cpp #680734:680735 @@ -2244,6 +2244,8 @@ else menuType = ListPopupMenu::mt_Association_Selected; } + if (m_pObject && getAssociation() == NULL) // atm m_pObject must be UMLAssociation + return; // @todo allow ListPopupMenu for other m_pObject types m_pMenu = new ListPopupMenu(m_pView, menuType); m_pMenu->popup(me -> globalPos()); connect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotMenuSelection(int))); SVN commit 683558 by okellogg: ListPopupMenu::mt_AttributeAssociation: New. At least permit deleting the AssociationWidget representing the attribute association. (More selections should be added.) CCBUG:147202 M +6 -4 associationwidget.cpp M +4 -0 listpopupmenu.cpp M +1 -0 listpopupmenu.h --- trunk/KDE/kdesdk/umbrello/umbrello/associationwidget.cpp #683557:683558 @@ -2345,13 +2345,13 @@ menuType = ListPopupMenu::mt_Anchor; else if (isCollaboration()) menuType = ListPopupMenu::mt_Collaboration_Message; - else if( AssocRules::allowRole( type ) ) + else if (getAssociation() == NULL) + menuType = ListPopupMenu::mt_AttributeAssociation; + else if (AssocRules::allowRole(type)) menuType = ListPopupMenu::mt_FullAssociation; else menuType = ListPopupMenu::mt_Association_Selected; } - if (m_pObject && getAssociation() == NULL) // atm m_pObject must be UMLAssociation - return; // @todo allow ListPopupMenu for other m_pObject types m_pMenu = new ListPopupMenu(m_pView, menuType); m_pMenu->popup(me -> globalPos()); connect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotMenuSelection(int))); @@ -2418,8 +2418,10 @@ case ListPopupMenu::mt_Delete: if (m_pAssocClassLineSel0) removeAssocClassLine(); + else if (getAssociation()) + m_pView->removeAssocInViewAndDoc(this); else - m_pView->removeAssocInViewAndDoc(this); + m_pView->removeAssoc(this); break; case ListPopupMenu::mt_Rename_MultiA: --- trunk/KDE/kdesdk/umbrello/umbrello/listpopupmenu.cpp #683557:683558 @@ -1404,6 +1404,10 @@ insertStdItem(mt_Properties); break; + case mt_AttributeAssociation: + insertStdItem(mt_Delete); // @todo add more items + break; + case mt_Collaboration_Message: // insertStdItem(mt_Cut); // insertStdItem(mt_Copy); --- trunk/KDE/kdesdk/umbrello/umbrello/listpopupmenu.h #683557:683558 @@ -156,6 +156,7 @@ mt_MultiB, mt_Name, //Association name mt_FullAssociation, // Association with role names + mt_AttributeAssociation, // Rendering of an attribute as an association mt_RoleNameA, mt_RoleNameB, mt_Delete_Selection, |