Lobby/room: Prevent opening context menu if no player selected (fixes bug 661)
authorWuzzy <Wuzzy2@mail.ru>
Tue, 07 Aug 2018 02:40:13 +0200
changeset 13630 10e256704181
parent 13629 6a06904c7bb8
child 13631 2bdbef3f534c
Lobby/room: Prevent opening context menu if no player selected (fixes bug #661)
ChangeLog.txt
QTfrontend/ui/widget/chatwidget.cpp
--- a/ChangeLog.txt	Tue Aug 07 02:18:19 2018 +0200
+++ b/ChangeLog.txt	Tue Aug 07 02:40:13 2018 +0200
@@ -30,6 +30,7 @@
 Frontend:
  * Controllers are detected again
  * No longer allow having schemes with equal names (case-insensitive)
+ * Lobby/room: No longer allow opening context menu if no player selected
 
 Highlander:
  * Fix all hogs receiving a free teleport after hog placement phase
--- a/QTfrontend/ui/widget/chatwidget.cpp	Tue Aug 07 02:18:19 2018 +0200
+++ b/QTfrontend/ui/widget/chatwidget.cpp	Tue Aug 07 02:40:13 2018 +0200
@@ -897,7 +897,9 @@
 
     QString nick;
 
-    if(mil.size())
+    if(mil.size() == 0)
+        return;
+    else if(mil.size() == 1)
         nick = mil[0].data().toString();
     else
         nick = m_clickedNick;