From 0fcc2a652fdf4e67dd4d9a7f6c3c99066e6900a5 Mon Sep 17 00:00:00 2001 From: svkalinin Date: Fri, 25 Nov 2022 08:07:55 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B0=20?= =?UTF-8?q?=D1=81=20=D0=B7=D0=B0=D0=BA=D1=80=D1=8B=D1=82=D0=B8=D0=B5=D0=BC?= =?UTF-8?q?=20=D1=84=D0=B0=D0=B9=D0=BB=D0=BE=D0=B2=20=D0=B2=20=D1=80=D0=B5?= =?UTF-8?q?=D0=B4=D0=B0=D0=BA=D1=82=D0=BE=D1=80=D0=B5=20=D0=BF=D1=80=D0=B8?= =?UTF-8?q?=20=D0=B7=D0=B0=D0=BA=D1=80=D1=8B=D1=82=D0=B8=D0=B8=20=D0=BF?= =?UTF-8?q?=D0=B0=D0=BF=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/files.tcl | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/lib/files.tcl b/lib/files.tcl index 9e9afa5..d063670 100644 --- a/lib/files.tcl +++ b/lib/files.tcl @@ -147,7 +147,7 @@ namespace eval FileOper { # .frmStatus.lblGit configure -text "[::msgcat::mc "Branch"]: [Git::Branches current]" return $fullPath } - + proc CloseFolder {} { global tree nbEditor activeProject @@ -157,14 +157,18 @@ namespace eval FileOper { set treeItem $parent set parent [$tree parent $treeItem] } + set upper [Tree::GetUpperItem $tree $treeItem] if {$parent eq "" && [string match "directory::*" $treeItem] == 1} { # puts "tree root item: $treeItem" + set proj [string trimleft $upper "directory::"] foreach nbItem [$nbEditor tabs] { set item [string trimleft [file extension $nbItem] "."] - # puts $item - if [$tree exists "file::$item"] { - $nbEditor select $nbItem - Close + # puts "$upper $item" + if [string match "$proj*" $item] { + if [$tree exists "file::$item"] { + $nbEditor select $nbItem + Close + } } } set nextProj [$tree next $treeItem] @@ -173,10 +177,10 @@ namespace eval FileOper { # puts $prevProj if {$nextProj ne ""} { SetActiveProject [$tree item $nextProj -values] - puts $activeProject + # puts $activeProject } elseif {$prevProj ne ""} { SetActiveProject [$tree item $prevProj -values] - puts $activeProject + # puts $activeProject } else { unset activeProject .frmStatus.lblGitLogo configure -image pixel