From c47c7de5eaa25992ab4f1ff8511123f6c67dccb3 Mon Sep 17 00:00:00 2001 From: Jay Nabonne Date: Wed, 19 Dec 2018 08:57:04 +0000 Subject: [PATCH] Allow overriding the label for stock buttons in wxQt Stock label should only be used if passed label is empty. Otherwise, passed label should override the default value. Closes https://github.com/wxWidgets/wxWidgets/pull/1086 --- src/qt/button.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/button.cpp b/src/qt/button.cpp index 7b7a2e992e..0bd270f1c9 100644 --- a/src/qt/button.cpp +++ b/src/qt/button.cpp @@ -45,7 +45,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& name ) { QtCreate(parent); - SetLabel( wxIsStockID( id ) ? wxGetStockLabel( id ) : label ); + SetLabel( label.IsEmpty() && wxIsStockID( id ) ? wxGetStockLabel( id ) : label ); return QtCreateControl( parent, id, pos, size, style, validator, name ); }