From 0d0f8635218a2893fcd00385019089253474f634 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Mon, 10 May 2021 08:05:45 -0400 Subject: add upstream 11.10 --- wx+/grid.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'wx+/grid.cpp') diff --git a/wx+/grid.cpp b/wx+/grid.cpp index ab9babbb..fb9aacbc 100644 --- a/wx+/grid.cpp +++ b/wx+/grid.cpp @@ -1641,6 +1641,12 @@ void Grid::updateWindowSizes(bool updateScrollbar) wxSize Grid::GetSizeAvailableForScrollTarget(const wxSize& size) { + //1. "size == GetSize() == (0, 0)" happens temporarily during initialization + //2. often it's even (0, 20) + //3. fuck knows why, but we *temporarily* get "size == GetSize() == (1, 1)" when wxAUI panel containing Grid is dropped + if (size.x <= 1 || size.y <= 1) + return {}; //probably best considering calling code in generic/scrlwing.cpp: wxScrollHelper::AdjustScrollbars() + //1. calculate row label width independent from scrollbars const int mainWinHeightGross = std::max(0, size.GetHeight() - getColumnLabelHeight()); //independent from client sizes and scrollbars! const ptrdiff_t logicalHeight = rowLabelWin_->getLogicalHeight(); // -- cgit