Author: mir3x
Date: Sat Nov  7 23:32:26 2015
New Revision: 30472

URL: http://svn.gna.org/viewcvs/freeciv?rev=30472&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:
    branches/S2_5/client/gui-qt/chatline.cpp
    branches/S2_5/client/gui-qt/mapview.cpp

Modified: branches/S2_5/client/gui-qt/chatline.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-qt/chatline.cpp?rev=30472&r1=30471&r2=30472&view=diff
==============================================================================
--- branches/S2_5/client/gui-qt/chatline.cpp    (original)
+++ branches/S2_5/client/gui-qt/chatline.cpp    Sat Nov  7 23:32:26 2015
@@ -182,18 +182,19 @@
 ***************************************************************************/
 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());
   if (*theinput) {
     if (client_state() == C_S_RUNNING && ::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: branches/S2_5/client/gui-qt/mapview.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-qt/mapview.cpp?rev=30472&r1=30471&r2=30472&view=diff
==============================================================================
--- branches/S2_5/client/gui-qt/mapview.cpp     (original)
+++ branches/S2_5/client/gui-qt/mapview.cpp     Sat Nov  7 23:32:26 2015
@@ -1082,6 +1082,8 @@
 {
   const struct sprite *sprite;
   int d;
+  QSize delta;
+
   if (client_is_global_observer()) {
     return;
   }
@@ -1108,6 +1110,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