Author: mir3x Date: Fri Nov 20 17:27:20 2015 New Revision: 30720 URL: http://svn.gna.org/viewcvs/freeciv?rev=30720&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_5/client/gui-qt/cityrep.cpp Modified: branches/S2_5/client/gui-qt/cityrep.cpp URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-qt/cityrep.cpp?rev=30720&r1=30719&r2=30720&view=diff ============================================================================== --- branches/S2_5/client/gui-qt/cityrep.cpp (original) +++ branches/S2_5/client/gui-qt/cityrep.cpp Fri Nov 20 17:27:20 2015 @@ -1076,6 +1076,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')) { @@ -1087,8 +1088,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