[Uml-devel] branches/KDE/3.5/kdesdk/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Tue Apr 17 06:11:34 UTC 2007
SVN commit 654857 by okellogg:
activate(): Attempt resolving m_widget{A,B}Id only if the m_pOw[] is NULL.
BUG:144293
M +1 -0 ChangeLog
M +26 -22 umbrello/messagewidget.cpp
--- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #654856:654857
@@ -30,6 +30,7 @@
* Support duplication of diagrams (139856, 143581)
* Crash on changing multiplicity in an association in ERD (143909)
* Class diagram in folder not loaded correctly from xmi (144119)
+* Sequence diagram crashs during message inserting (144293)
Version 1.5.61
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/messagewidget.cpp #654856:654857
@@ -407,35 +407,39 @@
bool MessageWidget::activate(IDChangeLog * Log /*= 0*/) {
m_pView->resetPastePoint();
// UMLWidget::activate(Log); CHECK: I don't think we need this ?
- UMLWidget *pWA = m_pView->findWidget(m_widgetAId);
- if (pWA == NULL) {
- kDebug() << "MessageWidget::activate: role A object "
- << ID2STR(m_widgetAId) << " not found" << endl;
- return false;
- }
- UMLWidget *pWB = m_pView->findWidget(m_widgetBId);
- if (pWB == NULL) {
- kDebug() << "MessageWidget::activate: role B object "
- << ID2STR(m_widgetBId) << " not found" << endl;
- return false;
- }
- m_pOw[Uml::A] = dynamic_cast<ObjectWidget*>(pWA);
if (m_pOw[Uml::A] == NULL) {
- kDebug() << "MessageWidget::activate: role A widget "
- << ID2STR(m_widgetAId) << " is not an ObjectWidget" << endl;
- return false;
+ UMLWidget *pWA = m_pView->findWidget(m_widgetAId);
+ if (pWA == NULL) {
+ kDebug() << "MessageWidget::activate: role A object "
+ << ID2STR(m_widgetAId) << " not found" << endl;
+ return false;
+ }
+ m_pOw[Uml::A] = dynamic_cast<ObjectWidget*>(pWA);
+ if (m_pOw[Uml::A] == NULL) {
+ kDebug() << "MessageWidget::activate: role A widget "
+ << ID2STR(m_widgetAId) << " is not an ObjectWidget" << endl;
+ return false;
+ }
}
- m_pOw[Uml::B] = dynamic_cast<ObjectWidget*>(pWB);
if (m_pOw[Uml::B] == NULL) {
- kDebug() << "MessageWidget::activate: role B widget "
- << ID2STR(m_widgetBId) << " is not an ObjectWidget" << endl;
- return false;
+ UMLWidget *pWB = m_pView->findWidget(m_widgetBId);
+ if (pWB == NULL) {
+ kDebug() << "MessageWidget::activate: role B object "
+ << ID2STR(m_widgetBId) << " not found" << endl;
+ return false;
+ }
+ m_pOw[Uml::B] = dynamic_cast<ObjectWidget*>(pWB);
+ if (m_pOw[Uml::B] == NULL) {
+ kDebug() << "MessageWidget::activate: role B widget "
+ << ID2STR(m_widgetBId) << " is not an ObjectWidget" << endl;
+ return false;
+ }
}
updateResizability();
- UMLClassifier *c = dynamic_cast<UMLClassifier*>(pWB->getUMLObject());
+ UMLClassifier *c = dynamic_cast<UMLClassifier*>(m_pOw[Uml::B]->getUMLObject());
UMLOperation *op = NULL;
- if (c) {
+ if (c && !m_CustomOp.isEmpty()) {
Uml::IDType opId = STR2ID(m_CustomOp);
op = dynamic_cast<UMLOperation*>( c->findChildObjectById(opId, true) );
if (op) {
More information about the umbrello-devel
mailing list