773 self rootHolder value:(list directory asString) withoutNotifying:self. |
773 self rootHolder value:(list directory asString) withoutNotifying:self. |
774 (list size = 1 and:[list first isDirectory]) ifTrue:[list first expand:true] |
774 (list size = 1 and:[list first isDirectory]) ifTrue:[list first expand:true] |
775 ! |
775 ! |
776 |
776 |
777 selectionChanged |
777 selectionChanged |
778 |
|
779 |sel currentFileDir| |
778 |sel currentFileDir| |
780 |
779 |
781 " if viewFiles is false i can't take my |
780 "if viewFiles is false i can't take my |
782 selection to overwrite currentFileNameHolder" |
781 selection to overwrite currentFileNameHolder" |
783 |
|
784 sel := self selectedFiles. |
782 sel := self selectedFiles. |
785 (self viewFilesInDirectoryTree value not) ifTrue:[ |
783 self viewFilesInDirectoryTree value ifFalse:[ |
786 (self currentFilesAreInSameDirectory and:[sel size == 1 and:[self currentFileNameHolder value notEmpty]]) ifTrue:[ |
784 (self currentFilesAreInSameDirectory |
|
785 and:[sel size == 1 and:[self currentFileNameHolder value notEmpty]]) ifTrue:[ |
787 currentFileDir := self getDirWithoutFileName:(self currentFileNameHolder value first). |
786 currentFileDir := self getDirWithoutFileName:(self currentFileNameHolder value first). |
788 (sel first = currentFileDir) ifTrue:[ |
787 sel first = currentFileDir ifTrue:[ |
789 ^ self. |
788 ^ self. |
790 ]. |
789 ]. |
791 ]. |
790 ]. |
792 ]. |
791 ]. |
793 self currentFileNameHolder value:sel. |
792 self currentFileNameHolder value:sel. |
794 ! |
793 ! |
795 |
794 |
796 update:something with:aParameter from:aModel |
795 update:something with:aParameter from:aModel |
797 "one of my models changed |
796 "one of my models changed" |
798 " |
797 |
799 |
798 |
800 |
799 "the execution of selectionChanged and currentFileNameHolderChanged must |
801 " the execution of selectionChanged and currentFileNameHolderChanged must |
800 lock against each other because values mustn't be the same (e.g. no files |
802 lock against each other because values dont must be the same (e.g. no files |
801 in tree view)" |
803 in tree view) |
|
804 " |
|
805 |
802 |
806 aModel == self currentFileNameHolder ifTrue:[ |
803 aModel == self currentFileNameHolder ifTrue:[ |
807 super update:something with:aParameter from:aModel. |
804 super update:something with:aParameter from:aModel. |
808 self updateTreeSelection doIfUnLocked:[ |
805 self updateTreeSelection doIfUnLocked:[ |
809 self updateToExternFileHolderLock doLocked:[ |
806 self updateToExternFileHolderLock doLocked:[ |