Author: mir3x Date: Fri Nov 20 17:27:30 2015 New Revision: 30721 URL: http://svn.gna.org/viewcvs/freeciv?rev=30721&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: trunk/client/gui-qt/cityrep.cpp Modified: trunk/client/gui-qt/cityrep.cpp URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/cityrep.cpp?rev=30721&r1=30720&r2=30721&view=diff ============================================================================== --- trunk/client/gui-qt/cityrep.cpp (original) +++ trunk/client/gui-qt/cityrep.cpp Fri Nov 20 17:27:30 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