From 65daec7eaa3d9771d36cdd1f8c316e043e7a2650 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 2 Dec 2013 12:58:23 +0000 Subject: [PATCH] Check if colour really changed in wxGenericListCtrl::SetBackgroundColour(). Call the base class version to update the colour stored in the base class and also to avoid changing the colour of the main window unnecessarily if the colour didn't really change. This is also consistent with the code in SetForegroundColour() just below. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75328 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/listctrl.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index f17dd0124f..bbe22e4eef 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -5197,6 +5197,9 @@ void wxGenericListCtrl::OnInternalIdle() bool wxGenericListCtrl::SetBackgroundColour( const wxColour &colour ) { + if ( !wxWindow::SetBackgroundColour( colour ) ) + return false; + if (m_mainWin) { m_mainWin->SetBackgroundColour( colour );