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:
committed by
virtuoussin13
parent
6e0954ea38
commit
79874c14cf
@ -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 );
|
||||
|
Reference in New Issue
Block a user