X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=CheatDocument.m;fp=CheatDocument.m;h=d8fcb89798a2d61311c5c1be35c7273bc72756aa;hb=cd317fe26f0deee1697ea5454fcb74135e507e61;hp=719737b1569b7e5c323e4779f568057a5e2c292f;hpb=1654f21c723dadf0d88b0e92f882a6c9a69bf08e;p=chaz%2Fthecheat diff --git a/CheatDocument.m b/CheatDocument.m index 719737b..d8fcb89 100644 --- a/CheatDocument.m +++ b/CheatDocument.m @@ -454,7 +454,7 @@ Process static *_tc_target = nil; - (BOOL)isLoadedFromFile { - return ([self fileName] != nil); + return ([self fileURL] != nil); } @@ -1010,12 +1010,7 @@ Process static *_tc_target = nil; lastRow = [_cheatData variableCount]-1; [tableView reloadData]; - if ( MacOSXVersion() >= 0x1030 ) { - [tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:lastRow] byExtendingSelection:NO]; - } - else { - [tableView selectRow:lastRow byExtendingSelection:NO]; - } + [tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:lastRow] byExtendingSelection:NO]; [tableView scrollRowToVisible:lastRow]; [self setDocumentChanged]; @@ -1034,12 +1029,8 @@ Process static *_tc_target = nil; // reselect the last item if the selection is now invalid len = [_cheatData variableCount] - 1; if ( [tableView selectedRow] > len ) { - if ( MacOSXVersion() >= 0x1030 ) { + [tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:len] byExtendingSelection:NO]; - } - else { - [tableView selectRow:len byExtendingSelection:NO]; - } } [tableView reloadData];