--- a/src/hbcore/gui/hbabstractbutton.cpp Tue Jul 06 14:36:53 2010 +0300
+++ b/src/hbcore/gui/hbabstractbutton.cpp Wed Aug 18 10:05:37 2010 +0300
@@ -1167,9 +1167,14 @@
if (d->mRepolishRequested && isVisible()) {
d->mRepolishRequested = false;
// force the polish event in order to get the real size
- QEvent polishEvent(QEvent::Polish);
- QCoreApplication::sendEvent(const_cast<HbAbstractButton *>(this), &polishEvent);
- d->mSizeHintPolish = true;
+ if (!d->polished) {
+ QEvent polishEvent(QEvent::Polish);
+ QCoreApplication::sendEvent(const_cast<HbAbstractButton *>(this), &polishEvent);
+ d->mSizeHintPolish = true;
+ } else if (d->repolishOutstanding) {
+ QCoreApplication::sendPostedEvents(const_cast<HbAbstractButton *>(this), QEvent::Polish);
+ }
+ QCoreApplication::sendPostedEvents(const_cast<HbAbstractButton *>(this), QEvent::LayoutRequest);
}
return HbWidget::sizeHint(which, constraint);
}