summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
}