summaryrefslogtreecommitdiff
path: root/src/gui/widgets/spellshortcutcontainer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-03-30 00:07:54 +0300
committerAndrei Karas <akaras@inbox.ru>2014-03-30 00:07:54 +0300
commita93d1e06f928f6e4e1c7f3c58ddb7ae3676c1c63 (patch)
tree2d85d112997176e9ab765e638b0e7f2e16677b83 /src/gui/widgets/spellshortcutcontainer.cpp
parent5c83a96b8ad85ad0562542b9720a0df6c5fb550c (diff)
parent8983700f6c8cc6496626ed3af235e1ec31fe5501 (diff)
downloadplus-a93d1e06f928f6e4e1c7f3c58ddb7ae3676c1c63.tar.gz
plus-a93d1e06f928f6e4e1c7f3c58ddb7ae3676c1c63.tar.bz2
plus-a93d1e06f928f6e4e1c7f3c58ddb7ae3676c1c63.tar.xz
plus-a93d1e06f928f6e4e1c7f3c58ddb7ae3676c1c63.zip
Merge branch 'master' into stable
Diffstat (limited to 'src/gui/widgets/spellshortcutcontainer.cpp')
-rw-r--r--src/gui/widgets/spellshortcutcontainer.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/widgets/spellshortcutcontainer.cpp b/src/gui/widgets/spellshortcutcontainer.cpp
index ed92b62e1..e86376812 100644
--- a/src/gui/widgets/spellshortcutcontainer.cpp
+++ b/src/gui/widgets/spellshortcutcontainer.cpp
@@ -36,6 +36,8 @@
#include "resources/image.h"
+#include "utils/delete2.h"
+
#include "debug.h"
SpellShortcutContainer::SpellShortcutContainer(Widget2 *const widget,
@@ -78,8 +80,7 @@ SpellShortcutContainer::~SpellShortcutContainer()
if (mBackgroundImg)
mBackgroundImg->decRef();
mBackgroundImg = nullptr;
- delete mSpellPopup;
- mSpellPopup = nullptr;
+ delete2(mSpellPopup);
}
void SpellShortcutContainer::setWidget2(const Widget2 *const widget)
@@ -189,6 +190,7 @@ void SpellShortcutContainer::mousePressed(MouseEvent &event)
const int itemId = getItemByIndex(index);
if (itemId > 0)
mSpellClicked = true;
+ event.consume();
}
else if (eventButton == MouseEvent::RIGHT)
{
@@ -198,6 +200,7 @@ void SpellShortcutContainer::mousePressed(MouseEvent &event)
if (!spellShortcut || !spellManager)
return;
+ event.consume();
const int itemId = getItemByIndex(index);
spellManager->invoke(itemId);
}