Исправлено сохранение сессии в редакторе (открытие папки и файлов при следующем запуске)

This commit is contained in:
svkalinin 2022-12-07 16:00:04 +03:00
parent 9099d4ad61
commit a2880d5dd6
4 changed files with 8 additions and 5 deletions

View File

@ -590,7 +590,7 @@ namespace eval Editor {
$txt tag remove lightSelected 1.0 end $txt tag remove lightSelected 1.0 end
if { [winfo exists .varhelper] } { destroy .varhelper } if { [winfo exists .varhelper] } { destroy .varhelper }
puts $k # puts $k
switch $k { switch $k {
Return { Return {
regexp {^(\s*)} [$txt get [expr $lineNum - 1].0 [expr $lineNum - 1].end] -> spaceStart regexp {^(\s*)} [$txt get [expr $lineNum - 1].0 [expr $lineNum - 1].end] -> spaceStart
@ -1477,6 +1477,7 @@ namespace eval Editor {
ImageViewer $fileFullPath $itemName $fr ImageViewer $fileFullPath $itemName $fr
} else { } else {
set frmText [Editor::EditorWidget $fr $fileType $nb] set frmText [Editor::EditorWidget $fr $fileType $nb]
dict set editors $frmText.t fileFullPath $fileFullPath
} }
$fr.panelTxt add $frmText -weight 0 $fr.panelTxt add $frmText -weight 0

View File

@ -211,7 +211,7 @@ namespace eval FileOper {
} }
proc Close {} { proc Close {} {
global nbEditor modified tree global nbEditor modified tree editors
set nbItem [$nbEditor select] set nbItem [$nbEditor select]
# puts "close tab $nbItem" # puts "close tab $nbItem"
@ -246,6 +246,8 @@ namespace eval FileOper {
if [info exists modified($nbItem)] { if [info exists modified($nbItem)] {
unset modified($nbItem) unset modified($nbItem)
} }
# puts $nbItem
set editors [dict remove $editors $nbItem.frmText.t]
.frmStatus.lblPosition configure -text "" .frmStatus.lblPosition configure -text ""
.frmStatus.lblEncoding configure -text "" .frmStatus.lblEncoding configure -text ""
.frmStatus.lblSize configure -text "" .frmStatus.lblSize configure -text ""

View File

@ -82,7 +82,7 @@ namespace eval Tree {
set key [lindex [split $id "::"] 0] set key [lindex [split $id "::"] 0]
if {$values eq "" || $key eq ""} {return} if {$values eq "" || $key eq ""} {return}
puts "$key $tree $values" # puts "$key $tree $values"
switch $key { switch $key {
directory { directory {
FileOper::ReadFolder $values FileOper::ReadFolder $values
@ -104,7 +104,7 @@ namespace eval Tree {
set key [lindex [split $id "::"] 0] set key [lindex [split $id "::"] 0]
if {$values eq "" || $key eq ""} {return} if {$values eq "" || $key eq ""} {return}
puts "$key $tree $values" # puts "$key $tree $values"
switch -regexp $key { switch -regexp $key {
directory { directory {
FileOper::ReadFolder $values FileOper::ReadFolder $values

View File

@ -10,7 +10,7 @@ exec wish "$0" -- "$@"
###################################################### ######################################################
# Version: 2.0.0 # Version: 2.0.0
# Release: alpha # Release: alpha
# Build: 07122022142631 # Build: 07122022155807
###################################################### ######################################################
# определим текущую версию, релиз и т.д. # определим текущую версию, релиз и т.д.