Skip to content

Commit 7c0e0c3

Browse files
Desoursfan5
authored andcommittedJan 4, 2020
Formspec: Fix clicking on tooltip-obstructed elements (#9266)
1 parent f9c7e46 commit 7c0e0c3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎src/gui/guiFormSpecMenu.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,9 @@ void GUIFormSpecMenu::parseList(parserData* data, const std::string &element)
447447
gui::IGUIElement *e = new gui::IGUIElement(EGUIET_ELEMENT, Environment,
448448
this, spec.fid, rect);
449449

450+
// the element the list is bound to should not block mouse-clicks
451+
e->setVisible(false);
452+
450453
m_inventorylists.emplace_back(loc, listname, e, geom, start_i,
451454
data->real_coordinates);
452455
m_fields.push_back(spec);
@@ -2243,6 +2246,9 @@ void GUIFormSpecMenu::parseTooltip(parserData* data, const std::string &element)
22432246
gui::IGUIElement *e = new gui::IGUIElement(EGUIET_ELEMENT, Environment,
22442247
this, fieldspec.fid, rect);
22452248

2249+
// the element the rect tooltip is bound to should not block mouse-clicks
2250+
e->setVisible(false);
2251+
22462252
m_fields.push_back(fieldspec);
22472253
m_tooltip_rects.emplace_back(e, spec);
22482254

0 commit comments

Comments
 (0)
Please sign in to comment.