Project

General

Profile

RE: Is there a way to reverse a call to WDialog:rejectWhe... » 0002-wt-3.2.1-add-wdialog-esc-arg.patch

patch 2 (WDialog.C) - Steve Drake, 05/13/2013 01:52 PM

View differences:

wt-3.2.1/src/Wt/WDialog.C
WCompositeWidget::render(flags);
}
void WDialog::rejectWhenEscapePressed()
void WDialog::rejectWhenEscapePressed(bool enable)
{
WApplication::instance()->globalEscapePressed()
.connect(this, &WDialog::reject);
if (enable) {
escapeConnection1_ = WApplication::instance()->globalEscapePressed()
.connect(this, &WDialog::reject);
impl_->escapePressed().connect(this, &WDialog::reject);
escapeConnection2_ = impl_->escapePressed().connect(this, &WDialog::reject);
} else {
escapeConnection1_.disconnect();
escapeConnection2_.disconnect();
}
}
#ifndef WT_DEPRECATED_3_0_0
(2-2/2)