summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-01-27 17:46:28 +0300
committerAndrei Karas <akaras@inbox.ru>2016-01-27 17:46:28 +0300
commitc34858a4c7889483a8775c65c9bd1f357bca2572 (patch)
tree65f7d0492116d15bcb719800c86903e8d52e9311 /src/gui/windows
parente1233ab2508be02b0bd59c90f42b1c3406b60564 (diff)
downloadmanaplus-c34858a4c7889483a8775c65c9bd1f357bca2572.tar.gz
manaplus-c34858a4c7889483a8775c65c9bd1f357bca2572.tar.bz2
manaplus-c34858a4c7889483a8775c65c9bd1f357bca2572.tar.xz
manaplus-c34858a4c7889483a8775c65c9bd1f357bca2572.zip
Remove copy to clipboard action in npc dialog popup.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/npcdialog.cpp15
-rw-r--r--src/gui/windows/npcdialog.h3
2 files changed, 4 insertions, 14 deletions
diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp
index 862c6bfcd..60c8f06d6 100644
--- a/src/gui/windows/npcdialog.cpp
+++ b/src/gui/windows/npcdialog.cpp
@@ -1241,19 +1241,10 @@ void NpcDialog::mousePressed(MouseEvent &event)
}
}
-void NpcDialog::copyToClipboard(const BeingId npcId,
- const int x, const int y)
+void NpcDialog::copyToClipboard(const int x, const int y) const
{
- NpcDialogs::iterator it = mNpcDialogs.find(npcId);
- if (it != mNpcDialogs.end())
- {
- const BrowserBox *const text = (*it).second->mTextBox;
- if (!text)
- return;
-
- std::string str = text->getTextAtPos(x, y);
- sendBuffer(str);
- }
+ std::string str = mTextBox->getTextAtPos(x, y);
+ sendBuffer(str);
}
void NpcDialog::setSkin(const std::string &skin)
diff --git a/src/gui/windows/npcdialog.h b/src/gui/windows/npcdialog.h
index 524ae7bd8..fa3e52097 100644
--- a/src/gui/windows/npcdialog.h
+++ b/src/gui/windows/npcdialog.h
@@ -250,8 +250,7 @@ class NpcDialog final : public Window,
NpcInputState getInputState()
{ return mInputState; }
- static void copyToClipboard(const BeingId npcId,
- const int x, const int y);
+ void copyToClipboard(const int x, const int y) const;
static NpcDialogs mNpcDialogs;