summaryrefslogtreecommitdiffstats
path: root/generic/ttk
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2019-03-31 14:09:37 (GMT)
committerfvogel <fvogelnew1@free.fr>2019-03-31 14:09:37 (GMT)
commitc46f74289a79498f91f6bd70d409449bc6f00b41 (patch)
treebcef393d667d164cfb1534cf33c179b4fcadd005 /generic/ttk
parentaede5d4ff5faad110cd46b702d203f7337f2c3b7 (diff)
parentdb0089391e638dba6174fa80b2ab69a03cbce72b (diff)
downloadtk-c46f74289a79498f91f6bd70d409449bc6f00b41.zip
tk-c46f74289a79498f91f6bd70d409449bc6f00b41.tar.gz
tk-c46f74289a79498f91f6bd70d409449bc6f00b41.tar.bz2
Fix [da3914eba2]: 'identify element' on ttk::treeview does not identify images added via 'insert ... -image ...'
Diffstat (limited to 'generic/ttk')
-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 7aad8ae..48656f7 100644
--- a/generic/ttk/ttkTreeview.c
+++ b/generic/ttk/ttkTreeview.c
@@ -2231,7 +2231,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);
@@ -2343,7 +2345,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);