From bcae216816abc6601491d48a595a09152cbc63a3 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Fri, 18 Dec 2015 14:29:40 +0200 Subject: [PATCH] Fixed: Table colspan overwrites previous row column width --HG-- branch : develop --- code/nel/src/gui/group_table.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/code/nel/src/gui/group_table.cpp b/code/nel/src/gui/group_table.cpp index 65ed2d93d..2ce6a70fc 100644 --- a/code/nel/src/gui/group_table.cpp +++ b/code/nel/src/gui/group_table.cpp @@ -805,12 +805,13 @@ namespace NLGUI uint newsize = column + cell->ColSpan - 1; if (newsize >= _Columns.size()) _Columns.resize(newsize+1); + for(uint span = 0; span < cell->ColSpan -1; span++){ column++; - _Columns[column].Width = _Columns[column-1].Width; - _Columns[column].WidthMax = _Columns[column-1].WidthMax; - _Columns[column].TableRatio = _Columns[column-1].TableRatio; - _Columns[column].WidthWanted = _Columns[column-1].WidthWanted; + _Columns[column].Width = std::max(_Columns[column].Width, _Columns[column-1].Width); + _Columns[column].WidthMax = std::max(_Columns[column].WidthMax, _Columns[column-1].WidthMax); + _Columns[column].TableRatio = std::max(_Columns[column].TableRatio, _Columns[column-1].TableRatio); + _Columns[column].WidthWanted = std::max(_Columns[column].WidthWanted, _Columns[column-1].WidthWanted); _Columns[column].RowSpan = _Columns[column-1].RowSpan; } }