[Kst] extragear/graphics/kst/kst
Andrew Walker
arwalker at sumusltd.com
Thu Dec 1 19:56:53 CET 2005
SVN commit 484745 by arwalker:
BUG:115893 Ensure axis alignment occurs across groups by burrowing down into groups to determine the axis alignment and dirty states.
M +5 -6 ksttoplevelview.cpp
M +8 -0 kstviewobject.cpp
--- trunk/extragear/graphics/kst/kst/ksttoplevelview.cpp #484744:484745
@@ -112,11 +112,8 @@
// X11 triggered event in that case, since we already iterate.
// Also this might break if a draw happens before this is called,
// which was at least the case at one time in the past.
- for (KstViewObjectList::ConstIterator i = _children.begin(); i != _children.end(); ++i) {
- if ((*i)->dirty()) {
- updateAlignment(p);
- break;
- }
+ if (objectDirty()) {
+ updateAlignment(p);
}
}
#ifdef BENCHMARK
@@ -143,7 +140,9 @@
KST::alignment.reset();
for (KstViewObjectList::Iterator i = _children.begin(); i != _children.end(); ++i) {
(*i)->internalAlignment(p, plotRegion);
- KST::alignment.setPosition((*i)->geometry(), plotRegion);
+ if (!plotRegion.isNull()) {
+ KST::alignment.setPosition((*i)->geometry(), plotRegion);
+ }
}
}
--- trunk/extragear/graphics/kst/kst/kstviewobject.cpp #484744:484745
@@ -544,6 +544,14 @@
void KstViewObject::internalAlignment(KstPainter& p, QRect& plotRegion) {
Q_UNUSED(p)
static const QRect x(0,0,0,0);
+
+ for (KstViewObjectList::Iterator i = _children.begin(); i != _children.end(); ++i) {
+ (*i)->internalAlignment(p, plotRegion);
+ if (!plotRegion.isNull()) {
+ KST::alignment.setPosition((*i)->geometry(), plotRegion);
+ }
+ }
+
plotRegion = x;
}
More information about the Kst
mailing list