diff options
author | fvogel <fvogelnew1@free.fr> | 2019-03-31 14:09:37 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2019-03-31 14:09:37 (GMT) |
commit | c46f74289a79498f91f6bd70d409449bc6f00b41 (patch) | |
tree | bcef393d667d164cfb1534cf33c179b4fcadd005 | |
parent | aede5d4ff5faad110cd46b702d203f7337f2c3b7 (diff) | |
parent | db0089391e638dba6174fa80b2ab69a03cbce72b (diff) | |
download | tk-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 ...'
-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 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); |