diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-09 22:43:07 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-09 22:43:07 +0300 |
commit | 42e4aaa2a7fb69376ccb470e1c219030093f578f (patch) | |
tree | a2fca65e8de18fe832ec44bce6cb660af9fd308b /src/gui | |
parent | b1deabf2284621162c35b7c0a55b3d1be205d30d (diff) | |
download | mv-42e4aaa2a7fb69376ccb470e1c219030093f578f.tar.gz mv-42e4aaa2a7fb69376ccb470e1c219030093f578f.tar.bz2 mv-42e4aaa2a7fb69376ccb470e1c219030093f578f.tar.xz mv-42e4aaa2a7fb69376ccb470e1c219030093f578f.zip |
Allow open outfits context menu in whole outfists window.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/windows/outfitwindow.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/gui/windows/outfitwindow.cpp b/src/gui/windows/outfitwindow.cpp index 09cf1a95c..a74967bb4 100644 --- a/src/gui/windows/outfitwindow.cpp +++ b/src/gui/windows/outfitwindow.cpp @@ -421,17 +421,15 @@ void OutfitWindow::mouseDragged(MouseEvent &event) void OutfitWindow::mousePressed(MouseEvent &event) { const int index = getIndexFromGrid(event.getX(), event.getY()); - if (index == -1) + if (event.getButton() == MouseButton::RIGHT && popupManager) { - if (event.getButton() == MouseButton::RIGHT && popupManager) - { - popupManager->showOutfitsPopup(); - event.consume(); - } - else - { - Window::mousePressed(event); - } + popupManager->showOutfitsPopup(); + event.consume(); + return; + } + else if (index == -1) + { + Window::mousePressed(event); return; } mMoved = false; |