Better fix for 32 bit wxOSX build
Instead of disabling vertical alignment support in wxDataViewCtrl, move the
private variables to the header file: this is supported by all versions of the
Objective-C runtime, including the old one used for 32 bit applications,
unlike the new way based on declaring the variable in an anonymous extension.
This replaces the changes of 22216b70e7.
This commit is contained in:
@@ -376,6 +376,12 @@ private:
|
||||
#define wxTextFieldCell NSTextFieldCell
|
||||
#else
|
||||
@interface wxTextFieldCell : NSTextFieldCell
|
||||
{
|
||||
@private
|
||||
int _wxAlignment;
|
||||
BOOL _adjustRect;
|
||||
}
|
||||
|
||||
-(void) setWXAlignment:(int)alignment;
|
||||
@end
|
||||
#endif
|
||||
|
||||
@@ -1252,20 +1252,6 @@ outlineView:(NSOutlineView*)outlineView
|
||||
// wxTextFieldCell
|
||||
// ============================================================================
|
||||
|
||||
#ifndef _LP64
|
||||
// The code below doesn't compile in 32 bits failing with
|
||||
//
|
||||
// error: instance variables may not be placed in class extension
|
||||
//
|
||||
// Until this can be fixed, disable it to at least fix compilation.
|
||||
#else
|
||||
@interface wxTextFieldCell ()
|
||||
{
|
||||
int _wxAlignment;
|
||||
BOOL _adjustRect;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation wxTextFieldCell
|
||||
|
||||
- (void)setWXAlignment:(int)alignment
|
||||
@@ -1331,7 +1317,6 @@ outlineView:(NSOutlineView*)outlineView
|
||||
}
|
||||
|
||||
@end
|
||||
#endif // 32/64 bits
|
||||
|
||||
|
||||
// ============================================================================
|
||||
@@ -2763,10 +2748,8 @@ void wxDataViewRenderer::OSXUpdateAlignment()
|
||||
int align = GetEffectiveAlignment();
|
||||
NSCell *cell = GetNativeData()->GetColumnCell();
|
||||
[cell setAlignment:ConvertToNativeHorizontalTextAlignment(align)];
|
||||
#ifdef _LP64
|
||||
if ([cell respondsToSelector:@selector(setWXAlignment:)])
|
||||
[(wxTextFieldCell*)cell setWXAlignment:align];
|
||||
#endif // _LP64
|
||||
}
|
||||
|
||||
void wxDataViewRenderer::SetMode(wxDataViewCellMode mode)
|
||||
|
||||
Reference in New Issue
Block a user