File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 2626#define CONTENTS_VIEWPORT_HEIGHT -1
2727
2828#include <cmath>
29+ #include <math.h>
2930
3031namespace Wt {
3132
@@ -906,7 +907,7 @@ void WTableView::setColumnHidden(int column, bool hidden)
906907
907908void WTableView ::setColumnWidth (int column , const WLength & width )
908909{
909- WLength rWidth = WLength (std :: round (width .value ()), width .unit ());
910+ WLength rWidth = WLength (round (width .value ()), width .unit ());
910911 double delta = rWidth .toPixels () - columnInfo (column ).width .toPixels ();
911912 columnInfo (column ).width = rWidth ;
912913
Original file line number Diff line number Diff line change 44 * See the LICENSE file for terms of use.
55 */
66
7+ #include <math.h>
78#include <cmath>
89#include <iostream>
910#include <boost/lexical_cast.hpp>
@@ -1184,11 +1185,14 @@ WT_USTRING WTreeView::columnFormat(int column) const
11841185
11851186void WTreeView ::setColumnWidth (int column , const WLength & width )
11861187{
1187- columnInfo (column ).width = width ;
1188+ if (!width .isAuto ())
1189+ columnInfo (column ).width = WLength (round (width .value ()), width .unit ());
1190+ else
1191+ columnInfo (column ).width = WLength ::Auto ;
11881192
11891193 WWidget * toResize = columnInfo (column ).styleRule -> templateWidget ();
11901194 toResize -> setWidth (0 );
1191- toResize -> setWidth (width .toPixels ());
1195+ toResize -> setWidth (columnInfo ( column ). width .toPixels ());
11921196
11931197 WApplication * app = WApplication ::instance ();
11941198
You can’t perform that action at this time.
0 commit comments