[Uml-devel] KDE/kdesdk/umbrello/umbrello/widgets
Ralf Habacker
ralf.habacker at gmail.com
Sat Mar 24 15:11:46 UTC 2012
SVN commit 1286947 by habacker:
Use scene from AssociationWidget; no need to use the parent.
M +6 -10 associationline.cpp
M +1 -1 umlwidget.cpp
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/associationline.cpp #1286946:1286947
@@ -333,11 +333,8 @@
m_pSubsetSymbol = 0;
m_bHeadCreated = m_bParallelLineCreated = m_bSubsetSymbolCreated = false;
if (m_associationWidget) {
- UMLView * view = (UMLView *)m_associationWidget->parent();
- if (view) {
- disconnect(view->umlScene(), SIGNAL(sigLineColorChanged(Uml::IDType)), this, SLOT(slotLineColorChanged(Uml::IDType)));
- disconnect(view->umlScene(), SIGNAL(sigLineWidthChanged(Uml::IDType)), this, SLOT(slotLineWidthChanged(Uml::IDType)));
- }
+ disconnect(m_associationWidget->umlScene(), SIGNAL(sigLineColorChanged(Uml::IDType)), this, SLOT(slotLineColorChanged(Uml::IDType)));
+ disconnect(m_associationWidget->umlScene(), SIGNAL(sigLineWidthChanged(Uml::IDType)), this, SLOT(slotLineWidthChanged(Uml::IDType)));
m_associationWidget = 0;
}
}
@@ -627,13 +624,12 @@
createSubsetSymbol();
if( getAssocType() == Uml::AssociationType::Coll_Message )
setupParallelLine();
- UMLView * view = (UMLView *)m_associationWidget->parent();
- if (view) {
- connect(view->umlScene(), SIGNAL(sigLineColorChanged(Uml::IDType)), this, SLOT(slotLineColorChanged(Uml::IDType)));
- connect(view->umlScene(), SIGNAL(sigLineWidthChanged(Uml::IDType)), this, SLOT(slotLineWidthChanged(Uml::IDType)));
+ if (m_associationWidget) {
+ connect(m_associationWidget->umlScene(), SIGNAL(sigLineColorChanged(Uml::IDType)), this, SLOT(slotLineColorChanged(Uml::IDType)));
+ connect(m_associationWidget->umlScene(), SIGNAL(sigLineWidthChanged(Uml::IDType)), this, SLOT(slotLineWidthChanged(Uml::IDType)));
}
else {
- uWarning() << "Parent is null. Can not connect SIGNAL/SLOT.";
+ uWarning() << "scene is null. Can not connect SIGNAL/SLOT.";
}
}
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/umlwidget.cpp #1286946:1286947
@@ -546,7 +546,7 @@
if (m_usesDiagramLineColor) {
m_LineColor = m_scene->lineColor();
- setLineColor( m_lineColor );
+ setLineColor( m_LineColor );
}
update();
}
More information about the umbrello-devel
mailing list