Исправлено переключение вкладок при закрытии
This commit is contained in:
parent
8402409489
commit
dbb8c3f911
|
@ -233,10 +233,13 @@ namespace eval FileOper {
|
|||
$tree delete $treeItem
|
||||
}
|
||||
}
|
||||
unset modified($nbItem)
|
||||
if [info exists modified($nbItem)] {
|
||||
unset modified($nbItem)
|
||||
}
|
||||
.frmStatus.lblPosition configure -text ""
|
||||
.frmStatus.lblEncoding configure -text ""
|
||||
.frmStatus.lblSize configure -text ""
|
||||
NB::NextTab $nbEditor 0
|
||||
}
|
||||
|
||||
proc Save {} {
|
||||
|
@ -439,9 +442,10 @@ namespace eval FileOper {
|
|||
set res [SearchStringInFolder $str]
|
||||
}
|
||||
}
|
||||
FindInFilesDialog $txt $res
|
||||
.find.entryFind delete 0 end
|
||||
.find.entryFind insert end $str
|
||||
if [FindInFilesDialog $txt $res] {
|
||||
.find.entryFind delete 0 end
|
||||
.find.entryFind insert end $str
|
||||
}
|
||||
}
|
||||
|
||||
proc ReplaceInFiles {} {
|
||||
|
|
|
@ -188,6 +188,7 @@ ttk::style layout TNotebook.Tab {
|
|||
bind TNotebook <Button-1> "catch {NB::PressTab %W %x %y}\;[bind TNotebook <Button-1>];break"
|
||||
# bind <<NotebookTabChanged>> "NB::PressTab %W %x %y"
|
||||
bind TNotebook <ButtonRelease-1> "NB::PressTab %W %x %y"
|
||||
# bind TNotebook <Control-w> FileOper::Close
|
||||
# bind . <Control-Tab> "NB::NextTab $nbEditor"
|
||||
bind . <Control-Next> "NB::NextTab $nbEditor 1"
|
||||
bind . <Control-Prior> "NB::NextTab $nbEditor -1"
|
||||
|
|
|
@ -61,6 +61,9 @@ namespace eval NB {
|
|||
proc NextTab {w step} {
|
||||
global tree
|
||||
set i [expr [$w index end] - 1]
|
||||
if {[$w select] eq ""} {
|
||||
return
|
||||
}
|
||||
set nbItemIndex [$w index [$w select]]
|
||||
if {$nbItemIndex eq 0 && $step eq "-1"} {
|
||||
$w select $i
|
||||
|
|
|
@ -511,7 +511,7 @@ proc FindInFilesDialog {txt {args ""}} {
|
|||
}
|
||||
set win .find
|
||||
|
||||
if { [winfo exists $win] } { destroy $win }
|
||||
if { [winfo exists $win] } { destroy $win; return false}
|
||||
toplevel $win
|
||||
wm transient $win .
|
||||
wm overrideredirect $win 1
|
||||
|
@ -639,6 +639,7 @@ proc FindInFilesDialog {txt {args ""}} {
|
|||
focus -force $win.entryFind
|
||||
}
|
||||
# $win.lBox focus I001
|
||||
return true
|
||||
}
|
||||
|
||||
proc ShowMessage {title msg} {
|
||||
|
|
Loading…
Reference in New Issue
Block a user