From 1c467e8804ff4c1cd3aee52bb16dfa4f976160a0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 4 Sep 2013 00:14:15 +0000 Subject: [PATCH] Don't take hidden wxGrid row/columns into account when auto-sizing. The contents not shown to the user shouldn't affect the fitting width/height of the columns/rows that are shown. See #15464. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74753 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/grid.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index c7a062946d..31f9297c63 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -8398,11 +8398,17 @@ wxGrid::AutoSizeColOrRow(int colOrRow, bool setAsMin, wxGridDirection direction) { if ( column ) { + if ( !IsRowShown(rowOrCol) ) + continue; + row = rowOrCol; col = colOrRow; } else { + if ( !IsColShown(rowOrCol) ) + continue; + row = colOrRow; col = rowOrCol; } -- 2.45.2