[Uml-devel] branches/KDE/3.5/kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Fri May 5 14:31:04 UTC 2006
SVN commit 537809 by okellogg:
Hi Daniel, thanks for contacting me. You're right, I had overlooked your
attachment 15847 which I am applying here. I've learned that the KDE 3.5
branch is still open for small fixes such as this :-)
CCBUG:67058
M +4 -6 aligntoolbar.cpp
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/aligntoolbar.cpp #537808:537809
@@ -262,7 +262,7 @@
int smallestY = getSmallestY(widgetList);
int biggestY = getBiggestY(widgetList);
int heightsSum = getHeightsSum(widgetList);
- int distance = ((biggestY - smallestY) - heightsSum) / (int)(widgetList.count()-1);
+ int distance = int(((biggestY - smallestY) - heightsSum) / (widgetList.count()-1.0) + 0.5);
sortWidgetList(widgetList, hasWidgetSmallerY);
@@ -275,8 +275,7 @@
++it;
while ((widget = it.current()) != 0) {
++it;
- widget->setY((widgetPrev->getY() + int(widgetPrev->getHeight() / 2)) +
- distance + int(widget->getHeight() / 2));
+ widget->setY(widgetPrev->getY() + widgetPrev->getHeight() + distance);
widgetPrev = widget;
}
}
@@ -285,7 +284,7 @@
int smallestX = getSmallestX(widgetList);
int biggestX = getBiggestX(widgetList);
int widthsSum = getWidthsSum(widgetList);
- int distance = ((biggestX - smallestX) - widthsSum) / (int)(widgetList.count()-1);
+ int distance = int(((biggestX - smallestX) - widthsSum) / (widgetList.count()-1.0) + 0.5);
sortWidgetList(widgetList, hasWidgetSmallerX);
@@ -298,8 +297,7 @@
++it;
while ((widget = it.current()) != 0) {
++it;
- widget->setX((widgetPrev->getX() + int(widgetPrev->getWidth() / 2)) +
- distance + int(widget->getWidth() / 2));
+ widget->setX(widgetPrev->getX() + widgetPrev->getWidth() + distance);
widgetPrev = widget;
}
}
More information about the umbrello-devel
mailing list