summaryrefslogtreecommitdiff
path: root/src/actions/commands.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-01-27 18:55:52 +0300
committerAndrei Karas <akaras@inbox.ru>2016-01-27 18:55:52 +0300
commiteb0c8a2a08a7b55eb80667b106657aeee4023dd9 (patch)
tree72aacba357f61d997baec2819195595772a5da70 /src/actions/commands.cpp
parentdd73b250eb8390a87e09eeefc054202835b29a43 (diff)
downloadmv-eb0c8a2a08a7b55eb80667b106657aeee4023dd9.tar.gz
mv-eb0c8a2a08a7b55eb80667b106657aeee4023dd9.tar.bz2
mv-eb0c8a2a08a7b55eb80667b106657aeee4023dd9.tar.xz
mv-eb0c8a2a08a7b55eb80667b106657aeee4023dd9.zip
remove removepickup action from social window popup menu.
Diffstat (limited to 'src/actions/commands.cpp')
-rw-r--r--src/actions/commands.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index b57883841..9f38844ee 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -1158,6 +1158,7 @@ impHandler(addPickup)
{
if (actorManager)
{
+ actorManager->removePickupItem(event.args);
actorManager->addPickupItem(event.args);
if (socialWindow)
socialWindow->updatePickupFilter();
@@ -1170,7 +1171,23 @@ impHandler(removePickup)
{
if (actorManager)
{
- actorManager->removePickupItem(event.args);
+ if (event.args.empty())
+ { // default pickup manipulation
+ if (actorManager->checkDefaultPickup())
+ {
+ actorManager->removePickupItem(event.args);
+ actorManager->addIgnorePickupItem(event.args);
+ }
+ else
+ {
+ actorManager->removePickupItem(event.args);
+ actorManager->addPickupItem(event.args);
+ }
+ }
+ else
+ { // any other pickups
+ actorManager->removePickupItem(event.args);
+ }
if (socialWindow)
socialWindow->updatePickupFilter();
return true;
@@ -1182,6 +1199,7 @@ impHandler(ignorePickup)
{
if (actorManager)
{
+ actorManager->removePickupItem(event.args);
actorManager->addIgnorePickupItem(event.args);
if (socialWindow)
socialWindow->updatePickupFilter();