Summary: | Maximize mode no longer working | ||
---|---|---|---|
Product: | [Applications] kst | Reporter: | Andrew Walker <arwalker> |
Component: | view objects | Assignee: | George Staikos <staikos> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kst |
Priority: | NOR | ||
Version: | 1.x | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Patch |
Description
Andrew Walker
2006-01-30 20:51:59 UTC
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 |