|
|
@ -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();
|
|
|
|
}
|
|
|
|
}
|
|
|
|