summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-08-07 13:09:43 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-08-07 13:09:43 -0500
commite45396f47ad04cc316f972140ac83c0de409be1b (patch)
treee8312140e1f25086640fa90d9773fe4f90ad2daf /src
parent6fb1d18ed13beaee8c8e48a25ff0c4a075d872b5 (diff)
downloadtqt3-e45396f47ad04cc316f972140ac83c0de409be1b.tar.gz
tqt3-e45396f47ad04cc316f972140ac83c0de409be1b.zip
Automated update from Qt3
Diffstat (limited to 'src')
-rw-r--r--src/kernel/qstyle.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/kernel/qstyle.cpp b/src/kernel/qstyle.cpp
index 8529305dd..9960e1d33 100644
--- a/src/kernel/qstyle.cpp
+++ b/src/kernel/qstyle.cpp
@@ -2355,12 +2355,21 @@ bool TQStyle::eventFilter(TQObject *o, TQEvent *e) {
ControlElementFlags elementFlags = m_objectEventSourceFlagsToHandlerMap[o];
bool ret;
TQWidget* w = dynamic_cast<TQWidget*>(o);
- if ((w) && (e->type() == TQEvent::Paint)) {
- TQPainter p(w);
- TQPainter* activePainterOrig = ceData.activePainter;
- const_cast<TQStyleControlElementData&>(ceData).activePainter = &p;
- ret = handler->objectEventHandler(ceData, elementFlags, o, e);
- const_cast<TQStyleControlElementData&>(ceData).activePainter = activePainterOrig;
+ if (w) {
+ // Update ceData as widget parameters may have changed
+ // If not done glitches may appear such as those present in Bug 1816
+ populateControlElementDataFromWidget(w, TQStyleOption());
+ const TQStyleControlElementData &widgetCEData = *(w->controlElementDataObject());
+ if (e->type() == TQEvent::Paint) {
+ TQPainter p(w);
+ TQPainter* activePainterOrig = widgetCEData.activePainter;
+ const_cast<TQStyleControlElementData&>(widgetCEData).activePainter = &p;
+ ret = handler->objectEventHandler(widgetCEData, elementFlags, o, e);
+ const_cast<TQStyleControlElementData&>(widgetCEData).activePainter = activePainterOrig;
+ }
+ else {
+ ret = handler->objectEventHandler(widgetCEData, elementFlags, o, e);
+ }
}
else {
ret = handler->objectEventHandler(ceData, elementFlags, o, e);