diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-03-10 09:34:07 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-03-10 09:34:07 -0600 |
commit | 171198999b4290f3e2adadd019c8d914212ecf47 (patch) | |
tree | a5d29699b7639346901e34b32efa66a306f5bd13 | |
parent | 343d290f639646b9a3a90c9402dfc8e76989bdcb (diff) | |
download | mana-171198999b4290f3e2adadd019c8d914212ecf47.tar.gz mana-171198999b4290f3e2adadd019c8d914212ecf47.tar.bz2 mana-171198999b4290f3e2adadd019c8d914212ecf47.tar.xz mana-171198999b4290f3e2adadd019c8d914212ecf47.zip |
Make sure NPC input dialogs get focus
-rw-r--r-- | src/gui/npcintegerdialog.cpp | 5 | ||||
-rw-r--r-- | src/gui/npclistdialog.cpp | 5 | ||||
-rw-r--r-- | src/gui/npcstringdialog.cpp | 5 |
3 files changed, 12 insertions, 3 deletions
diff --git a/src/gui/npcintegerdialog.cpp b/src/gui/npcintegerdialog.cpp index ea06ca8d..fad37700 100644 --- a/src/gui/npcintegerdialog.cpp +++ b/src/gui/npcintegerdialog.cpp @@ -139,7 +139,10 @@ void NpcIntegerDialog::requestFocus() void NpcIntegerDialog::setVisible(bool visible) { - if (visible) npcTextDialog->setVisible(true); + if (visible) { + npcTextDialog->setVisible(true); + requestFocus(); + } Window::setVisible(visible); } diff --git a/src/gui/npclistdialog.cpp b/src/gui/npclistdialog.cpp index c1493afd..94dfabeb 100644 --- a/src/gui/npclistdialog.cpp +++ b/src/gui/npclistdialog.cpp @@ -134,7 +134,10 @@ void NpcListDialog::action(const gcn::ActionEvent &event) void NpcListDialog::setVisible(bool visible) { - if (visible) npcTextDialog->setVisible(true); + if (visible) { + npcTextDialog->setVisible(true); + requestFocus(); + } Window::setVisible(visible); } diff --git a/src/gui/npcstringdialog.cpp b/src/gui/npcstringdialog.cpp index 525a73a0..7c9f78af 100644 --- a/src/gui/npcstringdialog.cpp +++ b/src/gui/npcstringdialog.cpp @@ -101,7 +101,10 @@ void NpcStringDialog::requestFocus() void NpcStringDialog::setVisible(bool visible) { - if (visible) npcTextDialog->setVisible(true); + if (visible) { + npcTextDialog->setVisible(true); + requestFocus(); + } Window::setVisible(visible); } |