From 866f239c150226bbf6108980be41c52f5490fd57 Mon Sep 17 00:00:00 2001
From: Andrei Karas <akaras@inbox.ru>
Date: Wed, 29 May 2013 18:45:55 +0300
Subject: improve avatarlistbox

---
 src/gui/widgets/avatarlistbox.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'src')

diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp
index 964a2ab82..3792906d2 100644
--- a/src/gui/widgets/avatarlistbox.cpp
+++ b/src/gui/widgets/avatarlistbox.cpp
@@ -102,7 +102,6 @@ void AvatarListBox::draw(gcn::Graphics *gcnGraphics)
     updateAlpha();
     Graphics *const graphics = static_cast<Graphics *const>(gcnGraphics);
 
-//    mHighlightColor.a = static_cast<int>(mAlpha * 255.0f);
     gcn::Font *const font = getFont();
 
     const int fontHeight = getFont()->getHeight();
@@ -318,7 +317,8 @@ void AvatarListBox::mousePressed(gcn::MouseEvent &event)
     if (!ava)
         return;
 
-    if (event.getButton() == gcn::MouseEvent::LEFT)
+    const unsigned int eventButton = event.getButton();
+    if (eventButton == gcn::MouseEvent::LEFT)
     {
         if (ava->getType() == AVATAR_PLAYER)
         {
@@ -332,7 +332,7 @@ void AvatarListBox::mousePressed(gcn::MouseEvent &event)
             player_node->navigateTo(ava->getX(), ava->getY());
         }
     }
-    else if (event.getButton() == gcn::MouseEvent::RIGHT)
+    else if (eventButton == gcn::MouseEvent::RIGHT)
     {
         switch (ava->getType())
         {
@@ -390,7 +390,7 @@ void AvatarListBox::mousePressed(gcn::MouseEvent &event)
             }
         }
     }
-    else if (event.getButton() == gcn::MouseEvent::MIDDLE)
+    else if (eventButton == gcn::MouseEvent::MIDDLE)
     {
         if (ava->getType() == AVATAR_PLAYER && chatWindow)
         {
-- 
cgit v1.2.3-70-g09d2