Author: mir3x
Date: Fri Nov 20 17:27:36 2015
New Revision: 30722

URL: http://svn.gna.org/viewcvs/freeciv?rev=30722&view=rev
Log:
One more change to the same bug, first resize 
everything by qt (resizeToContests, instead relying 
on sizeHint), then fix faulty columns by hand. 
Reported by Jacob Nevins <jtn>

See bug #24048


Modified:
    branches/S2_6/client/gui-qt/cityrep.cpp

Modified: branches/S2_6/client/gui-qt/cityrep.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/cityrep.cpp?rev=30722&r1=30721&r2=30722&view=diff
==============================================================================
--- branches/S2_6/client/gui-qt/cityrep.cpp     (original)
+++ branches/S2_6/client/gui-qt/cityrep.cpp     Fri Nov 20 17:27:36 2015
@@ -1077,6 +1077,7 @@
   setUpdatesEnabled(false);
   list_model->all_changed();
   restore_selection();
+  header()->resizeSections(QHeaderView::ResizeToContents);
   for (int j = 0; j < filter_model->columnCount(); j++) {
     str = list_model->headerData(j, Qt::Horizontal, 
Qt::DisplayRole).toString();
     if (str.contains('\n')) {
@@ -1088,8 +1089,6 @@
         width = qMax(width, fm.width(s));
       }
       header()->resizeSection(j, width + 10);
-    } else {
-      header()->resizeSection(j, header()->sectionSizeHint(j));
     }
   }
   setUpdatesEnabled(true);


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

Reply via email to