mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-23 11:41:05 +00:00
Cast to NSProgressIndiciator so corret isVertical method is choosen by compiler. Add check before casting.
This commit is contained in:
parent
fb3a4840e6
commit
b143ab112d
2 changed files with 13 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
2020-04-14 Riccardo Mottola <rm@gnu.org>
|
||||
|
||||
* Palettes/2Controls/GormProgressIndicatorAttributesInspector.m
|
||||
Cast to NSProgressIndiciator so corret isVertical method is choosen by compiler. Add check before casting.
|
||||
|
||||
2020-03-29 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* GormCore/GormDocument.m: Remove NSNibConnector duplicating code
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
GormProgressIndicatorAttributesInspector.m
|
||||
|
||||
Copyright (C) 2001-2005 Free Software Foundation, Inc.
|
||||
Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
||||
|
||||
Author: Adam Fedor <fedor@gnu.org>
|
||||
Laurent Julliard <laurent@julliard-online.org>
|
||||
|
@ -94,10 +94,13 @@
|
|||
{
|
||||
if ( object == nil )
|
||||
return;
|
||||
[indeterminate setState: [object isIndeterminate]?NSOnState:NSOffState];
|
||||
[vertical setState: [object isVertical] ? NSOnState:NSOffState];
|
||||
[minValue setIntValue: [object minValue]];
|
||||
[maxValue setIntValue: [object maxValue]];
|
||||
if ( ![object isKindOfClass:[NSProgressIndicator class]] )
|
||||
NSLog ( @"GormNSProgressIndicatorInspector: Unexpected class of object; %@", [object class]);
|
||||
|
||||
[indeterminate setState: [(NSProgressIndicator *)object isIndeterminate]?NSOnState:NSOffState];
|
||||
[vertical setState: [(NSProgressIndicator *)object isVertical] ? NSOnState:NSOffState];
|
||||
[minValue setIntValue: [(NSProgressIndicator *)object minValue]];
|
||||
[maxValue setIntValue: [(NSProgressIndicator *)object maxValue]];
|
||||
|
||||
[super revert:sender];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue