Project

General

Profile

Bug #1899 ยป 0001-Hack-fix-for-Bug-1899.patch

Hack to fix the bug. - Plug Gulp, 05/08/2013 10:21 PM

View differences:

src/Wt/WBootstrapTheme.C
break;
case DomElement_BUTTON: {
element.addPropertyWord(PropertyClass, "btn");
WPushButton *button = dynamic_cast<WPushButton *>(widget);
if (button) {
if (button->isDefault())
element.addPropertyWord(PropertyClass, "btn-primary");
if (button->menu()) {
element.addPropertyWord(PropertyInnerHTML,
if(1 == elementRole) {
if(dynamic_cast<WPushButton *>(widget)->menu()) {
element.addPropertyWord(PropertyInnerHTML,
"<span class=\"caret\"></span>");
}
}
} else {
element.addPropertyWord(PropertyClass, "btn");
WPushButton *button = dynamic_cast<WPushButton *>(widget);
if (button) {
if (button->isDefault())
element.addPropertyWord(PropertyClass, "btn-primary");
}
}
break;
}
src/Wt/WPushButton.C
if (popupMenu_)
popupMenu_->setButton(this);
flags_.set(BIT_TEXT_CHANGED);
repaint(RepaintInnerHtml);
}
void WPushButton::doRedirect()
......
if (flags_.test(BIT_TEXT_CHANGED) || all) {
element.setProperty(Wt::PropertyInnerHTML, text_.formattedText());
WApplication::instance()->theme()->apply(this, element, 1);
flags_.reset(BIT_TEXT_CHANGED);
}
    (1-1/1)