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
This commit is contained in:
committed by
Vadim Zeitlin
parent
ae20edb539
commit
c47c7de5ea
@@ -45,7 +45,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id,
|
|||||||
const wxString& name )
|
const wxString& name )
|
||||||
{
|
{
|
||||||
QtCreate(parent);
|
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 );
|
return QtCreateControl( parent, id, pos, size, style, validator, name );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user