Fix 'go to page' functionality. This resolves issue #5

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/9/head
Michele Calgaro 3 months ago
parent 7c8d217a67
commit 80ca2d186d
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -240,11 +240,10 @@ ZLTQtApplicationWindow::LineEditParameter::LineEditParameter(TQToolBar *toolbar,
void ZLTQtApplicationWindow::LineEditParameter::keyReleaseEvent(TQKeyEvent *event) { void ZLTQtApplicationWindow::LineEditParameter::keyReleaseEvent(TQKeyEvent *event) {
event->accept(); event->accept();
const std::string key = ZLTQtKeyUtil::keyName(event); if (event->key() == TQt::Key_Enter || event->key() == TQt::Key_Return) {
if (key == "<Return>") {
myWindow.application().doAction(myActionId); myWindow.application().doAction(myActionId);
myWindow.setFocusToMainWidget(); myWindow.setFocusToMainWidget();
} else if (key == "<Esc>") { } else if (event->key() == TQt::Key_Escape) {
restoreOldValue(); restoreOldValue();
myWindow.setFocusToMainWidget(); myWindow.setFocusToMainWidget();
} }

Loading…
Cancel
Save