summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-03-25 23:08:39 -0600
committerJared Adams <jaxad0127@gmail.com>2010-03-25 23:29:20 -0600
commit48754058d7be3f433734cb1524e9e74cfd4fd55f (patch)
treefac125f25c1b5ba05267d2e3ff5446ecb8627571 /src/gui
parentb9484310e0196528fb3fa91591a0b33127c4247a (diff)
downloadmana-client-48754058d7be3f433734cb1524e9e74cfd4fd55f.tar.gz
mana-client-48754058d7be3f433734cb1524e9e74cfd4fd55f.tar.bz2
mana-client-48754058d7be3f433734cb1524e9e74cfd4fd55f.tar.xz
mana-client-48754058d7be3f433734cb1524e9e74cfd4fd55f.zip
Simplify NPC input when only one dialog is open
Reviewed-by: Freeyorp
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/npcdialog.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/npcdialog.cpp b/src/gui/npcdialog.cpp
index 248a5f33..16b584f3 100644
--- a/src/gui/npcdialog.cpp
+++ b/src/gui/npcdialog.cpp
@@ -347,6 +347,9 @@ void NpcDialog::setVisible(bool visible)
NpcDialog *NpcDialog::getActive()
{
+ if (instances.size() == 1)
+ return instances.front();
+
DialogList::iterator it = instances.begin();
DialogList::iterator it_end = instances.end();