Added Change Notifications to MPExpression, MPMutableExpression and MPFunction
Removed -beginEditing and -endEditing Optimized -fixSymbols Updated Project File
This commit is contained in:
@@ -8,8 +8,9 @@
|
||||
|
||||
#import "MPFunction.h"
|
||||
#import "MPExpression.h"
|
||||
#import "MPRangePath.h"
|
||||
|
||||
#import "NSIndexPath+MPRemoveFirstIndex.h"
|
||||
#import "NSIndexPath+MPReverseIndexPath.h"
|
||||
|
||||
@implementation MPFunction
|
||||
|
||||
@@ -156,4 +157,16 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation MPFunction (MPDisplayExtension)
|
||||
|
||||
- (void)symbolsChangedInRangePath:(MPRangePath *)rangePath replacementLength:(NSUInteger)length
|
||||
{
|
||||
NSUInteger index = [self.parent indexOfSymbol:self];
|
||||
NSIndexPath *newLocation = [rangePath.location indexPathByPrecedingIndex:index];
|
||||
MPRangePath *newRangePath = [[MPRangePath alloc] initWithLocation:newLocation length:rangePath.length];
|
||||
[self.parent symbolsChangedInRangePath:newRangePath replacementLength:length];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user