Исправлена ошибка с закрытием файлов в редакторе при закрытии папки
This commit is contained in:
parent
167c374b9d
commit
0fcc2a652f
|
@ -157,14 +157,18 @@ namespace eval FileOper {
|
||||||
set treeItem $parent
|
set treeItem $parent
|
||||||
set parent [$tree parent $treeItem]
|
set parent [$tree parent $treeItem]
|
||||||
}
|
}
|
||||||
|
set upper [Tree::GetUpperItem $tree $treeItem]
|
||||||
if {$parent eq "" && [string match "directory::*" $treeItem] == 1} {
|
if {$parent eq "" && [string match "directory::*" $treeItem] == 1} {
|
||||||
# puts "tree root item: $treeItem"
|
# puts "tree root item: $treeItem"
|
||||||
|
set proj [string trimleft $upper "directory::"]
|
||||||
foreach nbItem [$nbEditor tabs] {
|
foreach nbItem [$nbEditor tabs] {
|
||||||
set item [string trimleft [file extension $nbItem] "."]
|
set item [string trimleft [file extension $nbItem] "."]
|
||||||
# puts $item
|
# puts "$upper $item"
|
||||||
if [$tree exists "file::$item"] {
|
if [string match "$proj*" $item] {
|
||||||
$nbEditor select $nbItem
|
if [$tree exists "file::$item"] {
|
||||||
Close
|
$nbEditor select $nbItem
|
||||||
|
Close
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
set nextProj [$tree next $treeItem]
|
set nextProj [$tree next $treeItem]
|
||||||
|
@ -173,10 +177,10 @@ namespace eval FileOper {
|
||||||
# puts $prevProj
|
# puts $prevProj
|
||||||
if {$nextProj ne ""} {
|
if {$nextProj ne ""} {
|
||||||
SetActiveProject [$tree item $nextProj -values]
|
SetActiveProject [$tree item $nextProj -values]
|
||||||
puts $activeProject
|
# puts $activeProject
|
||||||
} elseif {$prevProj ne ""} {
|
} elseif {$prevProj ne ""} {
|
||||||
SetActiveProject [$tree item $prevProj -values]
|
SetActiveProject [$tree item $prevProj -values]
|
||||||
puts $activeProject
|
# puts $activeProject
|
||||||
} else {
|
} else {
|
||||||
unset activeProject
|
unset activeProject
|
||||||
.frmStatus.lblGitLogo configure -image pixel
|
.frmStatus.lblGitLogo configure -image pixel
|
||||||
|
|
Loading…
Reference in New Issue
Block a user