Summary: | Label creation and subsequent move can cause Kst to crash | ||
---|---|---|---|
Product: | [Applications] kst | Reporter: | Andrew Walker <arwalker> |
Component: | general | Assignee: | kst |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 1.x | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Andrew Walker
2006-08-02 00:43:09 UTC
The essential problem here is that the size of the text label is determined not by the user but by the label text, font size, margin, etc. At the time of this size determination no check is made to ensure that the label will actually fit within its window. SVN commit 620438 by arwalker: BUG:131697 Ensure that the child object falls within the parent. Previously this was being done only for the contentsRect of the child, which is necessarily smaller than the overall geometry of the child. This fix prevents the described crash and provides a better visual result when a label is too large to fit within its parent. M +4 -0 kstborderedviewobject.cpp --- trunk/extragear/graphics/kst/src/libkstapp/kstborderedviewobject.cpp #620437:620438 @@ -201,6 +201,10 @@ _geom.setY(rect.top() - mpb); _geom.setWidth(rect.width() + 2 * mpb); _geom.setHeight(rect.height() + 2 * mpb); + + if(_parent) { + _geom = _geom.intersect(_parent->geometry()); + } } |