[Uml-devel] branches/KDE/3.5/kdesdk/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Wed Sep 21 10:47:42 UTC 2005
SVN commit 462673 by okellogg:
Patch from Peter Soetens <peter.soetens_AT_mech.kuleuven.be> fixes sequence
diagram message creation and deletion.
BUG:112992
M +1 -1 ChangeLog
M +10 -6 umbrello/messagewidget.cpp
M +12 -1 umbrello/objectwidget.cpp
M +2 -1 umbrello/toolbarstatemessages.cpp
--- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #462672:462673
@@ -12,7 +12,7 @@
57588 57672 58809 66461 67120 67719 72016 79433 87252 88117
97162 105564 108223 109591 109636 110073 110216 110231 110379 111088
111470 111502 111759 111768 112017 112292 112293 112333 112531 112552
-112936
+112936 112991 112992
Version 1.4.2 (maintenance release)
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/messagewidget.cpp #462672:462673
@@ -43,17 +43,21 @@
m_pOw[Uml::B]->setY(y);
}
- connect(m_pOw[Uml::A], SIGNAL(sigWidgetMoved(Uml::IDType)), this, SLOT(slotWidgetMoved(Uml::IDType)));
- connect(m_pOw[Uml::B], SIGNAL(sigWidgetMoved(Uml::IDType)), this, SLOT(slotWidgetMoved(Uml::IDType)));
+ // This is done in activate()
+// connect(m_pOw[Uml::A], SIGNAL(sigWidgetMoved(Uml::IDType)), this, SLOT(slotWidgetMoved(Uml::IDType)));
+// connect(m_pOw[Uml::B], SIGNAL(sigWidgetMoved(Uml::IDType)), this, SLOT(slotWidgetMoved(Uml::IDType)));
calculateWidget();
y = y < getMinHeight() ? getMinHeight() : y;
y = y > getMaxHeight() ? getMaxHeight() : y;
m_nY = y;
- connect(this, SIGNAL(sigMessageMoved()), m_pOw[Uml::A], SLOT(slotMessageMoved()) );
- connect(this, SIGNAL(sigMessageMoved()), m_pOw[Uml::B], SLOT(slotMessageMoved()) );
- m_pOw[Uml::A] -> messageAdded(this);
- m_pOw[Uml::B] -> messageAdded(this);
+ // This is done in activate()
+// connect(this, SIGNAL(sigMessageMoved()), m_pOw[Uml::A], SLOT(slotMessageMoved()) );
+// connect(this, SIGNAL(sigMessageMoved()), m_pOw[Uml::B], SLOT(slotMessageMoved()) );
+// m_pOw[Uml::A] -> messageAdded(this);
+// m_pOw[Uml::B] -> messageAdded(this);
+
+ this->activate();
}
MessageWidget::MessageWidget(UMLView * view, Uml::Sequence_Message_Type seqMsgType, Uml::IDType id)
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/objectwidget.cpp #462672:462673
@@ -322,11 +322,22 @@
}
void ObjectWidget::messageAdded(MessageWidget* message) {
+ if (messageWidgetList.containsRef(message) ) {
+ kdError() << "ObjectWidget::messageAdded("
+ << message->getName() << ") : duplicate entry !"
+ << endl;
+ return ;
+ }
messageWidgetList.append(message);
}
void ObjectWidget::messageRemoved(MessageWidget* message) {
- messageWidgetList.remove(message);
+ if ( messageWidgetList.remove(message) == false ) {
+ kdError() << "ObjectWidget::messageRemoved("
+ << message->getName() << ") : missing entry !"
+ << endl;
+ return ;
+ }
}
void ObjectWidget::slotMessageMoved() {
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/toolbarstatemessages.cpp #462672:462673
@@ -118,7 +118,8 @@
m_pUMLView->connect(m_pUMLView, SIGNAL(sigColorChanged(Uml::IDType)),
message, SLOT(slotColorChanged(Uml::IDType)));
- message->activate();
+ // According to contract only call from serialisation _not_ when newly added to existing diagram.
+ //message->activate();
m_pSelectedWidget = 0;
m_pUMLView->getMessageList().append(message);
More information about the umbrello-devel
mailing list