summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2019-03-31 14:09:20 (GMT)
committerfvogel <fvogelnew1@free.fr>2019-03-31 14:09:20 (GMT)
commitdb0089391e638dba6174fa80b2ab69a03cbce72b (patch)
tree77e2ccd35509d84e381c6d7d8338bdbbd0228fee /generic
parent3b936e0067e5f4ced677fdc4cbfc4a2cdb42ea79 (diff)
parent49ca784286da252d1760ebf60e203489f7c8f777 (diff)
downloadtk-db0089391e638dba6174fa80b2ab69a03cbce72b.zip
tk-db0089391e638dba6174fa80b2ab69a03cbce72b.tar.gz
tk-db0089391e638dba6174fa80b2ab69a03cbce72b.tar.bz2
Fix [da3914eba2]: 'identify element' on ttk::treeview does not identify images added via 'insert ... -image ...'
Diffstat (limited to 'generic')
-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);