The result of an init.. call might be a different object, store it

This commit is contained in:
Stefan Csomor
2017-06-26 11:53:37 +02:00
parent eb0c95a5ea
commit 48d1c4ff1a

View File

@@ -122,12 +122,12 @@ wxToolBarToolBase(
if ( id == wxID_SEPARATOR )
{
[bui initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
bui = [bui initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
bui.width = 25.0f;
}
else if ( bmpNormal.IsOk() )
{
[bui initWithImage:bmpNormal.GetUIImage() style:UIBarButtonItemStylePlain target:toolbar
bui = [bui initWithImage:bmpNormal.GetUIImage() style:UIBarButtonItemStylePlain target:toolbar
action:@selector(clickedAction:)];
}
else
@@ -137,7 +137,7 @@ wxToolBarToolBase(
else
style = UIBarButtonItemStyleBordered;
[bui initWithTitle:wxCFStringRef(label).AsNSString() style:style target:toolbar
bui = [bui initWithTitle:wxCFStringRef(label).AsNSString() style:style target:toolbar
action:@selector(clickedAction:)];
}