[Uml-devel] branches/KDE/3.5/kdesdk/umbrello/umbrello
Matthias Kretz
kretz at kde.org
Sat Dec 24 04:49:00 UTC 2005
SVN commit 491053 by mkretz:
fix loading of linecolors associations
M +2 -4 linepath.cpp
M +4 -4 widgetbase.cpp
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/linepath.cpp #491052:491053
@@ -810,15 +810,13 @@
QColor LinePath::getLineColor() {
if( !m_pAssociation )
return Qt::black;
- UMLView * view = (UMLView *)m_pAssociation -> parent();
- return view -> getLineColor();
+ return m_pAssociation -> getLineColor();
}
uint LinePath::getLineWidth() {
if( !m_pAssociation )
return 0;
- UMLView * view = (UMLView *)m_pAssociation -> parent();
- int viewLineWidth = view->getLineWidth();
+ int viewLineWidth = m_pAssociation -> getLineWidth();
if ( viewLineWidth >= 0 && viewLineWidth <= 10 )
return viewLineWidth;
else {
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/widgetbase.cpp #491052:491053
@@ -97,17 +97,17 @@
QString lineColour = qElement.attribute( "linecolour", "none" );
QString lineWidth = qElement.attribute( "linewidth", "none" );
if (lineColour != "none") {
- m_LineColour = QColor(lineColour);
+ setLineColor( QColor(lineColour) );
m_bUsesDiagramLineColour = false;
} else if (m_Type != Uml::wt_Box && m_pView != NULL) {
- m_LineColour = m_pView->getLineColor();
+ setLineColor( m_pView->getLineColor() );
m_bUsesDiagramLineColour = true;
}
if (lineWidth != "none") {
- m_LineWidth = lineWidth.toInt();
+ setLineWidth( lineWidth.toInt() );
m_bUsesDiagramLineWidth = false;
} else if ( m_pView ) {
- m_LineWidth = m_pView->getLineWidth();
+ setLineWidth( m_pView->getLineWidth() );
m_bUsesDiagramLineWidth = true;
}
return true;
More information about the umbrello-devel
mailing list