From d3e35b6bb18c833b679625ac50a84d5c05818715 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=CC=81clav=20Slavi=CC=81k?= Date: Sun, 16 Sep 2018 13:54:54 +0200 Subject: [PATCH] Fix wxUnknownControlContainer background handling Don't set invalid background color. Don't set debugging magenta background color, because it did more harm than good, particularly after d255dc6706c28862b5f67148bace2d4cc0388b0f. --- src/xrc/xh_unkwn.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xrc/xh_unkwn.cpp b/src/xrc/xh_unkwn.cpp index 83b1471700..d7c963d257 100644 --- a/src/xrc/xh_unkwn.cpp +++ b/src/xrc/xh_unkwn.cpp @@ -42,7 +42,6 @@ public: m_control(NULL) { m_bg = UseBgCol() ? GetBackgroundColour() : wxColour(); - SetBackgroundColour(wxColour(255, 0, 255)); } virtual void AddChild(wxWindowBase *child) wxOVERRIDE; @@ -104,7 +103,8 @@ void wxUnknownControlContainer::AddChild(wxWindowBase *child) wxPanel::AddChild(child); - SetBackgroundColour(m_bg); + if ( m_bg.IsOk() ) + SetBackgroundColour(m_bg); child->SetName(m_controlName); child->SetId(wxXmlResource::GetXRCID(m_controlName)); m_control = child;