summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-03-10 09:34:07 -0600
committerJared Adams <jaxad0127@gmail.com>2009-03-10 09:34:07 -0600
commit171198999b4290f3e2adadd019c8d914212ecf47 (patch)
treea5d29699b7639346901e34b32efa66a306f5bd13
parent343d290f639646b9a3a90c9402dfc8e76989bdcb (diff)
downloadmana-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.cpp5
-rw-r--r--src/gui/npclistdialog.cpp5
-rw-r--r--src/gui/npcstringdialog.cpp5
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);
}