Version: HEAD (using KDE KDE 3.5.0) Installed from: Compiled From Sources OS: Linux PROBLEM: When a plot is maximized it is not painted correctly STEPS TO REPRODUCE: Start Kst Create a window and create 3 plots within it Maximize one the plots RESULTS: The plot is not drawn, but flickers continually if in datamode and the mouse is moved. EXPECTED RESULTS: The plot is drawn normally.
Created attachment 14464 [details] Patch Attached patch to fix the problem. The maximized case didn't get updated on one of my iterations of redesign.
Please commit. cbn On January 30, 2006 07:18 pm, George Staikos wrote: [bugs.kde.org quoted mail]
SVN commit 504020 by staikos: Fix maximize after view object painting patch. BUG: 121060 M +19 -18 kstviewobject.cpp --- trunk/extragear/graphics/kst/kst/kstviewobject.cpp #504019:504020 @@ -340,7 +340,7 @@ // handle the case where we have maximized plots for (KstViewObjectList::Iterator i = _children.begin(); i != _children.end(); ++i) { if ((*i)->_maximized) { - (*i)->paint(p, bounds); + (*i)->paintSelf(p, bounds); maximized = true; break; } @@ -352,31 +352,32 @@ } else { clipRegion = bounds; } - if (!maximized && !_children.isEmpty()) { - KstViewObjectList::Iterator begin = _children.begin(); - for (KstViewObjectList::Iterator i = _children.fromLast();; --i) { - const QRegion thisObjectGeometry((*i)->geometry()); - if (nullBounds || !clipRegion.intersect(thisObjectGeometry).isEmpty()) { + if (!maximized) { + if (!_children.isEmpty()) { + KstViewObjectList::Iterator begin = _children.begin(); + for (KstViewObjectList::Iterator i = _children.fromLast();; --i) { + const QRegion thisObjectGeometry((*i)->geometry()); + if (nullBounds || !clipRegion.intersect(thisObjectGeometry).isEmpty()) { #ifdef BENCHMARK - QTime t; - t.start(); + QTime t; + t.start(); #endif - (*i)->paint(p, clipRegion); - clipRegion -= (*i)->clipRegion(); + (*i)->paint(p, clipRegion); + clipRegion -= (*i)->clipRegion(); #ifdef BENCHMARK - int x = t.elapsed(); - kstdDebug() << " -> object " << (*i)->tagName() << " took " << x << "ms" << endl; + int x = t.elapsed(); + kstdDebug() << " -> object " << (*i)->tagName() << " took " << x << "ms" << endl; #endif + } + if (i == begin) { + break; + } } - if (i == begin) { - break; - } } + // Paint ourself + paintSelf(p, clipRegion - p.uiMask()); } - // Paint ourself - paintSelf(p, clipRegion - p.uiMask()); - p.restore(); // Draw any inline UI items