[Kst] extragear/graphics/kst/kst
George Staikos
staikos at kde.org
Wed Nov 23 00:37:26 CET 2005
SVN commit 482453 by staikos:
- move the variable where it belongs
- += += += -> + + + to make it faster on debug builds (check the asm if you
need evidence)
- make it work (the first result was being clobbered)
- remove the lowerToBottom() again
-> if you need more evidence, try without this patch and do a cleanup
twice. The order keeps getting flipped.
( not to mention that it screws up the concept of non-flow objects )
M +1 -6 kstviewobject.cpp
--- trunk/extragear/graphics/kst/kst/kstviewobject.cpp #482452:482453
@@ -649,7 +649,6 @@
// of their top-left corner.
//
double minDistance = 0.0;
- double distance;
int pos = 0;
int x = 0;
int y = 0;
@@ -674,10 +673,7 @@
}
for (KstViewObjectList::Iterator it = childrenCopy.begin(); it != childrenCopy.end(); ++it) {
- distance = ceil( (double)rows * 2.0 * (*it)->aspectRatio().y );
- distance = rows * d2i( distance );
- distance += (*it)->aspectRatio().x * rows;
- distance += (*it)->aspectRatio().y;
+ double distance = ceil(double(rows) * 2.0 * (*it)->aspectRatio().y) + rows * d2i(distance) + (*it)->aspectRatio().x * rows + (*it)->aspectRatio().y;
if (it == childrenCopy.begin() || distance < minDistance) {
minDistance = distance;
@@ -689,7 +685,6 @@
KstViewObjectPtr vop = *nearest;
vop->move(pt);
vop->resize(sz);
- vop->lowerToBottom();
childrenCopy.remove(vop);
}
More information about the Kst
mailing list