avoiding potential infinite recursion
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61912 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -368,8 +368,14 @@ wxWidgetIPhoneImpl::~wxWidgetIPhoneImpl()
|
|||||||
|
|
||||||
bool wxWidgetIPhoneImpl::IsVisible() const
|
bool wxWidgetIPhoneImpl::IsVisible() const
|
||||||
{
|
{
|
||||||
// TODO reflect Superviews state
|
UIView* view = m_osxView;
|
||||||
return [m_osxView isHidden] == NO;
|
while ( view != nil && [view isHidden] == NO )
|
||||||
|
{
|
||||||
|
view = [view superview];
|
||||||
|
if (view != nil && [view isHidden])
|
||||||
|
NSLog(@"visible test failed for %@",view);
|
||||||
|
}
|
||||||
|
return view == nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWidgetIPhoneImpl::SetVisibility( bool visible )
|
void wxWidgetIPhoneImpl::SetVisibility( bool visible )
|
||||||
@@ -706,9 +712,12 @@ void wxWidgetIPhoneImpl::drawRect(CGRect* rect, WXWidget slf, void *WXUNUSED(_cm
|
|||||||
// call super
|
// call super
|
||||||
SEL _cmd = @selector(drawRect:);
|
SEL _cmd = @selector(drawRect:);
|
||||||
wxOSX_DrawRectHandlerPtr superimpl = (wxOSX_DrawRectHandlerPtr) [[slf superclass] instanceMethodForSelector:_cmd];
|
wxOSX_DrawRectHandlerPtr superimpl = (wxOSX_DrawRectHandlerPtr) [[slf superclass] instanceMethodForSelector:_cmd];
|
||||||
superimpl(slf, _cmd, *rect);
|
if ( superimpl != wxOSX_drawRect )
|
||||||
CGContextRestoreGState( context );
|
{
|
||||||
CGContextSaveGState( context );
|
superimpl(slf, _cmd, *rect);
|
||||||
|
CGContextRestoreGState( context );
|
||||||
|
CGContextSaveGState( context );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
wxpeer->MacPaintChildrenBorders();
|
wxpeer->MacPaintChildrenBorders();
|
||||||
wxpeer->MacSetCGContextRef( NULL );
|
wxpeer->MacSetCGContextRef( NULL );
|
||||||
|
Reference in New Issue
Block a user