diff options
author | treectrl <treectrl> | 2006-11-09 00:17:35 (GMT) |
---|---|---|
committer | treectrl <treectrl> | 2006-11-09 00:17:35 (GMT) |
commit | 1507bee3e073369d66ed70337c769980ad0959f7 (patch) | |
tree | 86fce283443c825b4bfc6cba29688681a2ad0e03 /demos | |
parent | e13df885a233cb491843a089facac847a80e43b8 (diff) | |
download | tktreectrl-1507bee3e073369d66ed70337c769980ad0959f7.zip tktreectrl-1507bee3e073369d66ed70337c769980ad0959f7.tar.gz tktreectrl-1507bee3e073369d66ed70337c769980ad0959f7.tar.bz2 |
Copy item states when displaying the current style in the canvas.
Diffstat (limited to 'demos')
-rw-r--r-- | demos/style-editor.tcl | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/demos/style-editor.tcl b/demos/style-editor.tcl index 54ddea0..77b61cd 100644 --- a/demos/style-editor.tcl +++ b/demos/style-editor.tcl @@ -1,4 +1,4 @@ -# RCS: @(#) $Id: style-editor.tcl,v 1.10 2006/11/05 06:48:34 treectrl Exp $ +# RCS: @(#) $Id: style-editor.tcl,v 1.11 2006/11/09 00:17:35 treectrl Exp $ namespace eval StyleEditor { variable Info @@ -737,6 +737,16 @@ proc StyleEditor::StyleToCanvas {{scroll 0}} { } if {$match ne ""} { set I $match + + foreach state [$Tdemo item state get $I] { + if {[lsearch -exact [$Tdemo state names] $state] != -1} { + $T item state set root $state + } + } + foreach state [$Tdemo item state forcolumn $I $C] { + $T item state set root $state + } + foreach E [$Tdemo item style elements $I $C] { foreach list [$Tdemo item element configure $I $C $E] { foreach {name x y default current} $list {} |