[Uml-devel] KDE/kdesdk/umbrello/umbrello
Matthias Kretz
kretz at kde.org
Sun Dec 25 08:34:01 UTC 2005
SVN commit 491328 by mkretz:
forward port from 3.5 branch: fix loading of linecolors
M +2 -4 linepath.cpp
M +4 -4 widgetbase.cpp
--- trunk/KDE/kdesdk/umbrello/umbrello/linepath.cpp #491327:491328
@@ -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 {
--- trunk/KDE/kdesdk/umbrello/umbrello/widgetbase.cpp #491327:491328
@@ -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