Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Giulio
purr-data
Commits
9f7fec5d
Commit
9f7fec5d
authored
Mar 16, 2017
by
Jonathan Wilkes
Browse files
bugfix for message box text updates that get sent before the window is mapped
parent
cf3769a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
pd/nw/pdgui.js
View file @
9f7fec5d
...
...
@@ -2278,20 +2278,23 @@ function gui_gobj_erase(cid, tag) {
}
function
gui_text_set
(
cid
,
tag
,
text
)
{
var
svg_text
=
get_item
(
cid
,
tag
+
"
text
"
);
if
(
svg_text
!==
null
)
{
// trim leading/trailing whitespace
text
=
text
.
trim
();
svg_text
.
textContent
=
""
;
text_to_tspans
(
cid
,
svg_text
,
text
);
}
else
{
// In tk, setting an option for a non-existent canvas
// item is ignored. Because of that, Miller didn't pay
// 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:
var
svg_text
;
if
(
patchwin
[
cid
])
{
svg_text
=
get_item
(
cid
,
tag
+
"
text
"
);
if
(
svg_text
!==
null
)
{
// trim leading/trailing whitespace
text
=
text
.
trim
();
svg_text
.
textContent
=
""
;
text_to_tspans
(
cid
,
svg_text
,
text
);
}
else
{
// In tk, setting an option for a non-existent canvas
// item is ignored. Because of that, Miller didn't pay
// 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);
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment