Allows the user to close the get key dialog without it overwriting their

current set button.


git-svn-id: svn://svn.code.sf.net/p/qjoypad/code/trunk@129 c05e91a0-76c8-4ec0-b377-ef19ce7cc080
This commit is contained in:
John Toman
2010-04-16 00:18:56 +00:00
committed by virtuoussin13
parent 6e0954ea38
commit 79874c14cf
3 changed files with 15 additions and 2 deletions

View File

@ -29,7 +29,6 @@ bool GetKey::x11Event( XEvent* e )
{
//keep Qt from closing the dialog upon seeing Esc pressed.
if (e->type == KeyPress) return true;
//On a key press, return the key and quit
//Ctrl+X == [No Key]
if (e->type == KeyRelease) {
@ -51,6 +50,11 @@ bool GetKey::x11Event( XEvent* e )
return false;
}
void GetKey::closeEvent(QCloseEvent *e) {
e->ignore();
done(-1);
}
void GetKey::paintEvent ( QPaintEvent * ) {
//whenever we need to repaint, draw in our text.
QPainter paint( this );