[Kst] kdeextragear-2/kst/kst
George Staikos
staikos at kde.org
Fri Apr 23 04:50:48 CEST 2004
CVS commit by staikos:
parentResized() should be recursive as noted, but updateFromAspect() should
not be. - revert last, fix parentResized()
M +11 -10 kstviewobject.cpp 1.29
--- kdeextragear-2/kst/kst/kstviewobject.cpp #1.28:1.29
@@ -216,5 +216,9 @@ void KstViewObject::parentResized(const
Q_UNUSED(old)
Q_UNUSED(size)
+ QSize oldSelf = this->size();
updateFromAspect();
+ for (KstViewObjectList::Iterator i = _children.begin(); i != _children.end(); ++i) {
+ (*i)->parentResized(oldSelf, this->size());
+ }
}
@@ -451,14 +455,11 @@ void KstViewObject::lower() {
void KstViewObject::updateFromAspect() {
- if (_parent) {
+ if (!_parent) {
+ return;
+ }
_geom.setX(_parent->geometry().left() + int(_aspect.x * _parent->geometry().width()));
_geom.setY(_parent->geometry().top() + int(_aspect.y * _parent->geometry().height()));
_geom.setRight(int(_geom.x() + _aspect.w * _parent->geometry().width()));
_geom.setBottom(int(_geom.y() + _aspect.h * _parent->geometry().height()));
-
- for (KstViewObjectList::Iterator i = _children.begin(); i != _children.end(); ++i) {
- (*i)->updateFromAspect();
- }
- }
}
More information about the Kst
mailing list