BathyScapheのTitleRulerAppearanceを手軽に変更するツール
Revision | 15978d8508c58ec461640ccbae6aa73f18856500 (tree) |
---|---|
Time | 2008-08-14 09:27:43 |
Author | masakih <masakih@user...> |
Commiter | masakih |
fix undo/redo bug.
git-svn-id: svn+ssh://macmini/usr/local/svnrepos/BSTRAEditor/BSTRAEditor@3 f892931e-c658-45bd-90f1-b3d0def27f12
@@ -292,10 +292,10 @@ final: | ||
292 | 292 | |
293 | 293 | p = paths; |
294 | 294 | while(*p) { |
295 | - [appearance addObserver:self | |
296 | - forKeyPath:*p++ | |
297 | - options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld | |
298 | - context:NULL]; | |
295 | + [appearance addObserver:self | |
296 | + forKeyPath:*p++ | |
297 | + options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld | |
298 | + context:NULL]; | |
299 | 299 | } |
300 | 300 | } |
301 | 301 | - (BSTitleRulerAppearance *)appearance |
@@ -343,7 +343,6 @@ final: | ||
343 | 343 | new = [change objectForKey:NSKeyValueChangeNewKey]; |
344 | 344 | if([old isEqual:new]) return; |
345 | 345 | |
346 | - [self updateChangeCount:NSChangeDone]; | |
347 | 346 | NSUndoManager *undo = [self undoManager]; |
348 | 347 | SEL sel = [self selForKey:keyPath]; |
349 | 348 | [undo beginUndoGrouping]; |
@@ -351,11 +350,9 @@ final: | ||
351 | 350 | [undo registerUndoWithTarget:appearance |
352 | 351 | selector:sel |
353 | 352 | object:old]; |
354 | - [[undo prepareWithInvocationTarget:self] updateChangeCount:NSChangeUndone]; | |
355 | 353 | } |
356 | 354 | if([keyPath isEqual:@"drawsCarvedText"]) { |
357 | 355 | [[undo prepareWithInvocationTarget:appearance] setDrawsCarvedText:[old boolValue]]; |
358 | - [[undo prepareWithInvocationTarget:self] updateChangeCount:NSChangeUndone]; | |
359 | 356 | } |
360 | 357 | [undo registerUndoWithTarget:self |
361 | 358 | selector:@selector(displayItemForKey:) |