[Kst] extragear/graphics/kst/kst

Andrew Walker arwalker at sumusltd.com
Wed Nov 23 01:10:32 CET 2005


George, could you please revert your changes as they break the code.
Your coment "make it work  (the first result was being clobbered)"
is not correct as distance is on the RHS of the following line.

On November 22, 2005 3:37 pm, George Staikos wrote:
> 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);
>      }
>
> _______________________________________________
> Kst mailing list
> Kst at kde.org
> https://mail.kde.org/mailman/listinfo/kst


More information about the Kst mailing list