Author: mir3x
Date: Sat Nov  7 23:32:36 2015
New Revision: 30473

URL: http://svn.gna.org/viewcvs/freeciv?rev=30473&view=rev
Log:
Sometimes after starting game, first chat message could be the last one from 
pregame chat or broken one. 
Fixed.

See bug #24028


Modified:
    trunk/client/gui-qt/chatline.cpp
    trunk/client/gui-qt/mapview.cpp

Modified: trunk/client/gui-qt/chatline.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/chatline.cpp?rev=30473&r1=30472&r2=30473&view=diff
==============================================================================
--- trunk/client/gui-qt/chatline.cpp    (original)
+++ trunk/client/gui-qt/chatline.cpp    Sat Nov  7 23:32:36 2015
@@ -181,7 +181,8 @@
 ***************************************************************************/
 void chatwdg::send()
 {
-  const char *theinput;
+  char *theinput;
+  char buf[MAX_LEN_MSG];
 
   theinput = chat_line->text().toUtf8().data();
   gui()->chat_history.prepend(chat_line->text());
@@ -189,12 +190,11 @@
     if (client_state() == C_S_RUNNING
         && gui_options.gui_qt_allied_chat_only
         && is_plain_public_message(theinput)) {
-      char buf[MAX_LEN_MSG];
-
       fc_snprintf(buf, sizeof(buf), ". %s", theinput);
       send_chat(buf);
     } else {
-      send_chat(theinput);
+      fc_snprintf(buf, sizeof(buf), "%s", theinput);
+      send_chat(buf);
     }
   }
   chat_line->clear();

Modified: trunk/client/gui-qt/mapview.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/mapview.cpp?rev=30473&r1=30472&r2=30473&view=diff
==============================================================================
--- trunk/client/gui-qt/mapview.cpp     (original)
+++ trunk/client/gui-qt/mapview.cpp     Sat Nov  7 23:32:36 2015
@@ -1087,6 +1087,8 @@
 {
   const struct sprite *sprite;
   int d;
+  QSize delta;
+
   if (client_is_global_observer()) {
     return;
   }
@@ -1113,6 +1115,9 @@
     tax_indicators[d]->setToolTip(_("Shows your current luxury/science/tax "
                                     "rates. Use mouse wheel to change them"));
   }
+
+  delta = gui()->mapview_wdg->size() - gui()->end_turn_rect->sizeHint();
+  move(delta.width(), delta.height());
 }
 
 /****************************************************************************


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to