File 0001-Avoid-refreshing-not-currently-visible-items-in-gene.patch of Package wxWidgets-3_0
From c4f569ed60f08ecb318c7268c92471cc5d9071a8 Mon Sep 17 00:00:00 2001
From: Vadim Zeitlin <vadim@wxwidgets.org>
Date: Mon, 2 Mar 2015 14:39:45 +0100
Subject: [PATCH] Avoid refreshing not currently visible items in generic
wxListCtrl.
This is useless at best and resulted in GTK+ warnings because we ended up
(somehow -- is there another bug lurking here?) with negative items height in
this case.
Closes #16862.
---
src/generic/listctrl.cpp | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp
index 771c400..d21a8c6 100644
--- a/src/generic/listctrl.cpp
+++ b/src/generic/listctrl.cpp
@@ -1935,6 +1935,13 @@ void wxListMainWindow::RefreshLines( size_t lineFrom, size_t lineTo )
size_t visibleFrom, visibleTo;
GetVisibleLinesRange(&visibleFrom, &visibleTo);
+ if ( lineFrom > visibleTo || lineTo < visibleFrom )
+ {
+ // None of these lines are currently visible at all, don't bother
+ // doing anything.
+ return;
+ }
+
if ( lineFrom < visibleFrom )
lineFrom = visibleFrom;
if ( lineTo > visibleTo )
--
2.7.0