[Uml-devel] branches/work/soc-umbrello/umbrello/widgets
Gopala Krishna A
krishna.ggk at gmail.com
Tue Aug 18 07:33:02 UTC 2009
SVN commit 1012835 by gopala:
CombinedFragmentWidget:
* Fixed inappropriate deletion of FloatingDashLineWidget's.
* Do not change line color, width, font color and font of
FloatingDashLineWidget's in case of change of same in CombinedFragmentWidget.
* Do not add FloatingDashLineWidget to UMLScene().
M +11 -35 combinedfragmentwidget.cpp
--- branches/work/soc-umbrello/umbrello/widgets/combinedfragmentwidget.cpp #1012834:1012835
@@ -81,17 +81,17 @@
m_combinedFragmentType = combinedfragmentType;
// creates a dash line if the combined fragment type is alternative or parallel
- if ((m_combinedFragmentType == Alt || m_combinedFragmentType == Par)
- && m_dashLines.isEmpty())
- {
- FloatingDashLineWidget *flt = new FloatingDashLineWidget(this);
- m_dashLines << flt;
+ if (m_combinedFragmentType == Alt || m_combinedFragmentType == Par) {
+ if (m_dashLines.isEmpty()) {
+ FloatingDashLineWidget *flt = new FloatingDashLineWidget(this);
+ m_dashLines << flt;
- if(m_combinedFragmentType == Alt) {
- flt->setText("else");
- }
+ if(m_combinedFragmentType == Alt) {
+ flt->setText("else");
+ }
- setupFloatingWidget(flt);
+ setupFloatingWidget(flt);
+ }
}
else {
// Other widgets do not have dash lines.
@@ -209,7 +209,8 @@
}
else {
m_dashLines.append(fdlwidget);
- setupFloatingWidget(fdlwidget);
+ // No need to call setupFloatingWidget as that will reset
+ // the line properties of FloatingDashLineWidget.
}
} else {
uError() << "unknown tag " << tag << endl;
@@ -461,28 +462,6 @@
updateFloatingWidgetsPosition();
}
- else if (change == FontHasChanged) {
- foreach (FloatingDashLineWidget *fldw, m_dashLines) {
- fldw->setFont(font());
- }
- updateFloatingWidgetsPosition();
- }
- else if (change == FontColorHasChanged) {
- foreach (FloatingDashLineWidget *fldw, m_dashLines) {
- fldw->setFontColor(fontColor());
- }
- }
- else if (change == LineColorHasChanged) {
- foreach(FloatingDashLineWidget *fldw, m_dashLines) {
- fldw->setLineColor(lineColor());
- }
- }
- else if (change == LineWidthHasChanged) {
- foreach(FloatingDashLineWidget *fldw, m_dashLines) {
- fldw->setLineWidth(lineWidth());
- }
- updateFloatingWidgetsPosition();
- }
return UMLWidget::attributeChange(change, oldValue);
}
@@ -500,9 +479,6 @@
flt->setLineWidth(lineWidth());
flt->setFontColor(fontColor());
flt->setFont(font());
- if (umlScene()) {
- umlScene()->addWidget(flt);
- }
}
/**
More information about the umbrello-devel
mailing list