Commit 9f7fec5d authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

bugfix for message box text updates that get sent before the window is mapped

parent cf3769a6
...@@ -2278,20 +2278,23 @@ function gui_gobj_erase(cid, tag) { ...@@ -2278,20 +2278,23 @@ function gui_gobj_erase(cid, tag) {
} }
function gui_text_set (cid, tag, text) { function gui_text_set (cid, tag, text) {
var svg_text = get_item(cid, tag + "text"); var svg_text;
if (svg_text !== null) { if (patchwin[cid]) {
// trim leading/trailing whitespace svg_text = get_item(cid, tag + "text");
text = text.trim(); if (svg_text !== null) {
svg_text.textContent = ""; // trim leading/trailing whitespace
text_to_tspans(cid, svg_text, text); text = text.trim();
} else { svg_text.textContent = "";
// In tk, setting an option for a non-existent canvas text_to_tspans(cid, svg_text, text);
// item is ignored. Because of that, Miller didn't pay } else {
// attention to parts of the implementation which attempted // In tk, setting an option for a non-existent canvas
// to set options before creating the item. To get a sense // item is ignored. Because of that, Miller didn't pay
// of where this is happening, uncomment the following line: // attention to parts of the implementation which attempted
// to set options before creating the item. To get a sense
// of where this is happening, uncomment the following line:
//post("gui_text_set: svg_text doesn't exist: tag: " + tag); //post("gui_text_set: svg_text doesn't exist: tag: " + tag);
}
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment