diff --git a/lib/function.tcl b/lib/function.tcl index c5dd76e..9d8c2b3 100644 --- a/lib/function.tcl +++ b/lib/function.tcl @@ -18,10 +18,14 @@ set server "" proc TreePress {tree} { global host server active_cluster infobase set id [$tree selection] + $tree tag remove selected + $tree item $id -tags selected + SetGlobalVarFromTreeItems $tree $id set values [$tree item $id -values] set key [lindex [split $id "::"] 0] if {$values eq "" || $key eq ""} {return} + Run::$key $tree $host $values } @@ -2000,7 +2004,8 @@ proc Edit::profile {tree host values} { } } proc Edit::profiles {tree host values} { - return + #return + Edit::profile $tree $host $values } proc Edit::directory {tree host values} { diff --git a/lib/gui.tcl b/lib/gui.tcl index 5292543..059c776 100644 --- a/lib/gui.tcl +++ b/lib/gui.tcl @@ -80,6 +80,14 @@ $tree_work tag configure dark -background $color(dark_table_bg) $tree_work tag configure light -background $color(light_table_bg) bind $tree_work Edit +$tree tag configure selected -background white -foreground black +$tree_work tag configure selected -background white -foreground black + +bind $tree_work { + $tree_work tag remove selected + $tree_work item [.frm_work.tree_work selection] -tags selected +} + #$tree_work heading par -text "Параметр" -anchor center #$tree_work heading val -text "Значение" -anchor center #set tree_work [ttk::treeview $frm_work.tree_work \ @@ -99,3 +107,4 @@ pack $frm_tree $frm_work -side left -expand true -fill both .panel add $frm_tree -weight 1 .panel add $frm_work -weight 1 + diff --git a/lib/ttk_theme_dark.tcl b/lib/ttk_theme_dark.tcl index 87f6442..e4c06c3 100644 --- a/lib/ttk_theme_dark.tcl +++ b/lib/ttk_theme_dark.tcl @@ -90,8 +90,7 @@ namespace eval ttk::theme::dark { ttk::style configure Treeview \ -background $colors(-lightframe) -itembackground {gray60 gray50} \ -itemfill #ffffff -itemaccentfill yellow \ - -fieldbackground $colors(-lightframe) \ - -selectbg "#4a6984" + -fieldbackground $colors(-lightframe) # ttk::style configure TreeCtrl \ # -background gray30 -itembackground {gray60 gray50} \ # -itemfill #ffffff -itemaccentfill yellow @@ -138,3 +137,5 @@ namespace eval ::tablelist:: { } } + +