• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

BathyScapheのTitleRulerAppearanceを手軽に変更するツール


Commit MetaInfo

Revision15978d8508c58ec461640ccbae6aa73f18856500 (tree)
Time2008-08-14 09:27:43
Authormasakih <masakih@user...>
Commitermasakih

Log Message

fix undo/redo bug.

git-svn-id: svn+ssh://macmini/usr/local/svnrepos/BSTRAEditor/BSTRAEditor@3 f892931e-c658-45bd-90f1-b3d0def27f12

Change Summary

Incremental Difference

--- a/BSTRADocument.m
+++ b/BSTRADocument.m
@@ -292,10 +292,10 @@ final:
292292
293293 p = paths;
294294 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];
299299 }
300300 }
301301 - (BSTitleRulerAppearance *)appearance
@@ -343,7 +343,6 @@ final:
343343 new = [change objectForKey:NSKeyValueChangeNewKey];
344344 if([old isEqual:new]) return;
345345
346- [self updateChangeCount:NSChangeDone];
347346 NSUndoManager *undo = [self undoManager];
348347 SEL sel = [self selForKey:keyPath];
349348 [undo beginUndoGrouping];
@@ -351,11 +350,9 @@ final:
351350 [undo registerUndoWithTarget:appearance
352351 selector:sel
353352 object:old];
354- [[undo prepareWithInvocationTarget:self] updateChangeCount:NSChangeUndone];
355353 }
356354 if([keyPath isEqual:@"drawsCarvedText"]) {
357355 [[undo prepareWithInvocationTarget:appearance] setDrawsCarvedText:[old boolValue]];
358- [[undo prepareWithInvocationTarget:self] updateChangeCount:NSChangeUndone];
359356 }
360357 [undo registerUndoWithTarget:self
361358 selector:@selector(displayItemForKey:)