diff -r ad4b61b0b2fd -r edf3a0e5ea8a FileApplicationNoteBook.st --- a/FileApplicationNoteBook.st Sun Jul 24 07:13:32 2011 +0200 +++ b/FileApplicationNoteBook.st Sun Jul 24 08:22:36 2011 +0200 @@ -612,30 +612,29 @@ ! setSameFileIndexFor:anAppl - |sameFiles index item| self class openAnotherApplicationOnSameItem ifFalse:[ anAppl sameFileIndex:nil. ^ self. ]. + item := anAppl item. item notNil ifTrue:[ - | hasSameFiles | sameFiles := self getSameApplicationsFor:anAppl. - hasSameFiles := sameFiles notEmpty. - hasSameFiles ifTrue:[ + (sameFiles notEmpty) ifTrue:[ (sameFiles size == 1 and:[sameFiles first sameFileIndex isNil]) ifTrue:[ anAppl sameFileIndex:1. - ^ self ] ifFalse:[ index := (sameFiles collect:[:el | (el sameFileIndex ? 1)]) max. anAppl sameFileIndex:index + 1. - ^ self - ] + ]. + ^ self ]. anAppl sameFileIndex:nil. ]. + + "Modified (format): / 24-07-2011 / 08:22:03 / cg" ! startApplication:anApplication @@ -6423,5 +6422,5 @@ !FileApplicationNoteBook class methodsFor:'documentation'! version_CVS - ^ '$Header: /cvs/stx/stx/libtool/FileApplicationNoteBook.st,v 1.253 2011-06-29 17:36:24 cg Exp $' + ^ '$Header: /cvs/stx/stx/libtool/FileApplicationNoteBook.st,v 1.254 2011-07-24 06:22:36 cg Exp $' ! !