diff options
author | fvogel <fvogelnew1@free.fr> | 2019-03-30 17:00:39 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2019-03-30 17:00:39 (GMT) |
commit | 49ca784286da252d1760ebf60e203489f7c8f777 (patch) | |
tree | e6358ea5406e4587ce8d837f331faff45a75a401 /generic/ttk/ttkTreeview.c | |
parent | a88925e14d0096bf75e3338b939fdf6ec49c72b5 (diff) | |
download | tk-49ca784286da252d1760ebf60e203489f7c8f777.zip tk-49ca784286da252d1760ebf60e203489f7c8f777.tar.gz tk-49ca784286da252d1760ebf60e203489f7c8f777.tar.bz2 |
Fix [da3914eba2]: 'identify element' on ttk::treeview does not identify images added via 'insert ... -image ...'
Diffstat (limited to 'generic/ttk/ttkTreeview.c')
-rw-r--r-- | generic/ttk/ttkTreeview.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c index b6616e1..68a9b6d 100644 --- a/generic/ttk/ttkTreeview.c +++ b/generic/ttk/ttkTreeview.c @@ -2233,7 +2233,9 @@ static int TreeviewHorribleIdentify( Ttk_Element element; BoundingBox(tv, item, NULL, &itemBox); - PrepareItem(tv, item, &displayItem); /*@@@ FIX: -text, etc*/ + PrepareItem(tv, item, &displayItem); + if (item->textObj) { displayItem.textObj = item->textObj; } + if (item->imageObj) { displayItem.imageObj = item->imageObj; } Ttk_RebindSublayout(layout, &displayItem); Ttk_PlaceLayout(layout, ItemState(tv,item), itemBox); element = Ttk_IdentifyElement(layout, x, y); @@ -2345,7 +2347,9 @@ static int TreeviewIdentifyCommand( return TCL_OK; } - PrepareItem(tv, item, &displayItem); /*@@@ FIX: fill in -text,etc */ + PrepareItem(tv, item, &displayItem); + if (item->textObj) { displayItem.textObj = item->textObj; } + if (item->imageObj) { displayItem.imageObj = item->imageObj; } Ttk_RebindSublayout(layout, &displayItem); Ttk_PlaceLayout(layout, ItemState(tv,item), bbox); element = Ttk_IdentifyElement(layout, x, y); |