summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkTreeview.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2019-03-30 17:00:39 (GMT)
committerfvogel <fvogelnew1@free.fr>2019-03-30 17:00:39 (GMT)
commit49ca784286da252d1760ebf60e203489f7c8f777 (patch)
treee6358ea5406e4587ce8d837f331faff45a75a401 /generic/ttk/ttkTreeview.c
parenta88925e14d0096bf75e3338b939fdf6ec49c72b5 (diff)
downloadtk-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.c8
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);