diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-08-25 00:55:26 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-08-25 00:55:26 +0300 |
commit | 07011b04bb619663d41ea0cc2bb9960157c3b846 (patch) | |
tree | e7334101d50e14fa7ac8428637305fa395bc9066 /src | |
parent | cf06e522d4914ba89db1544003a3572f6d19bd02 (diff) | |
download | mv-07011b04bb619663d41ea0cc2bb9960157c3b846.tar.gz mv-07011b04bb619663d41ea0cc2bb9960157c3b846.tar.bz2 mv-07011b04bb619663d41ea0cc2bb9960157c3b846.tar.xz mv-07011b04bb619663d41ea0cc2bb9960157c3b846.zip |
Update item container after each change in mail edit window.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/windows/maileditwindow.cpp | 5 | ||||
-rw-r--r-- | src/gui/windows/maileditwindow.h | 2 | ||||
-rw-r--r-- | src/net/eathena/mail2recv.cpp | 2 |
3 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/windows/maileditwindow.cpp b/src/gui/windows/maileditwindow.cpp index 0abaaee74..47b4d409e 100644 --- a/src/gui/windows/maileditwindow.cpp +++ b/src/gui/windows/maileditwindow.cpp @@ -235,3 +235,8 @@ void MailEditWindow::sendMail() mMessageField->getText()); } } + +void MailEditWindow::updateItems() +{ + mItemContainer->updateMatrix(); +} diff --git a/src/gui/windows/maileditwindow.h b/src/gui/windows/maileditwindow.h index 031a1545d..37d983c1c 100644 --- a/src/gui/windows/maileditwindow.h +++ b/src/gui/windows/maileditwindow.h @@ -58,6 +58,8 @@ class MailEditWindow final : public Window, Inventory *getInventory() const A_WARN_UNUSED; + void updateItems(); + private: void sendMail(); diff --git a/src/net/eathena/mail2recv.cpp b/src/net/eathena/mail2recv.cpp index bb0403681..3b6b7ed1a 100644 --- a/src/net/eathena/mail2recv.cpp +++ b/src/net/eathena/mail2recv.cpp @@ -164,6 +164,7 @@ void Mail2Recv::processAddItemResult(Net::MessageIn &msg) inventory->setCards(slot, cards, 4); inventory->setOptions(slot, options); inventory->setTag(slot, index); + mailEditWindow->updateItems(); delete options; } @@ -224,6 +225,7 @@ void Mail2Recv::processRemoveItemResult(Net::MessageIn &msg) } item->increaseQuantity(-amount); + mailEditWindow->updateItems(); } void Mail2Recv::processCheckNameResult(Net::MessageIn &msg) |