Jürgen Spitzmüller wrote: > but I'll see now > that it doesn't work yet if you hit ESC. I'll investigate.
Bennett, please try the attached. Jürgen
Index: src/frontends/qt4/QCitationDialog.C =================================================================== --- src/frontends/qt4/QCitationDialog.C (Revision 16574) +++ src/frontends/qt4/QCitationDialog.C (Arbeitskopie) @@ -27,6 +27,7 @@ #include <string> #include <QCloseEvent> +#include <QKeyEvent> using std::vector; using std::string; @@ -46,7 +47,7 @@ setWindowTitle(toqstr("LyX: " + getTitle())); - selectedLV->setModel(form_->selected()); + selectedLV->setModel(form_->selected()); availableLV->setModel(form_->available()); connect(citationStyleCO, SIGNAL(activated(int)), @@ -75,6 +76,18 @@ } +void QCitationDialog::keyPressEvent(QKeyEvent * event) +{ + if (event->key() == Qt::Key_Escape) { + form_->clearSelection(); + form_->clearParams(); + event->accept(); + close(); + } else + event->ignore(); +} + + void QCitationDialog::closeEvent(QCloseEvent * e) { form_->clearSelection(); Index: src/frontends/qt4/QCitationDialog.h =================================================================== --- src/frontends/qt4/QCitationDialog.h (Revision 16574) +++ src/frontends/qt4/QCitationDialog.h (Arbeitskopie) @@ -16,6 +16,7 @@ #include "ui/QCitationUi.h" #include <QCloseEvent> +#include <QKeyEvent> namespace lyx { namespace frontend { @@ -49,6 +50,7 @@ protected: void closeEvent (QCloseEvent * e); + void keyPressEvent (QKeyEvent * event); protected Q_SLOTS: