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
nerrons
purr-data
Commits
986d511f
Commit
986d511f
authored
Feb 20, 2019
by
Jonathan Wilkes
Browse files
fix bug where array name wasn't getting updated, plus some formatting fixes
parent
8b187ccf
Changes
4
Hide whitespace changes
Inline
Side-by-side
pd/nw/dialog_canvas.html
View file @
986d511f
...
...
@@ -554,7 +554,6 @@ function apply() {
// If this is a dialog to create a new array
// skip the canvas dialog callback
if
(
!
new_array_dialog
)
{
// Note: the "+" casts Boolean to Number
gop
=
+
get_input
(
"
gop
"
);
hide_name
=
+
get_input
(
"
hide_name
"
);
...
...
pd/src/g_array.c
View file @
986d511f
...
...
@@ -755,6 +755,7 @@ void garray_arraydialog(t_garray *x, t_symbol *s, int argc, t_atom *argv)
x
->
x_style
=
style
;
if
(
size
!=
a
->
a_n
)
{
glist_redraw
(
x
->
x_glist
);
garray_resize_long
(
x
,
size
);
}
else
...
...
@@ -764,16 +765,15 @@ void garray_arraydialog(t_garray *x, t_symbol *s, int argc, t_atom *argv)
happened to change it. Let me emphasize-- in order to
redraw array labels, we must call a function that redraws
not only the _entire_ array and its graph, but also redraws
the
parent canvas
in which the
graph
is displayed. There is
the
graph
in which the
array
is displayed. There is
no interface I can find to just say, "redraw the label".
Worse, Pd redraws a single array at least 3 times, and maybe
even the graph and the containing glist-- it's hard to tell
Worse, Pd redraws a single array at least 3 times-- hard to tell
because so much data is sent over the wire that I run out of
buffer in my terminal window. These are a side-effect of
garray_redraw, as well as the garray_resize branch above. (And
don't forget that the canvas dialog callback
probably
causes
as many redraws as well
.)
don't forget that the canvas dialog callback causes
some
of these
.)
Until the Pd codebase handles redrawing in a sane fashion,
without depending on a vast array of side-effects, there's
...
...
pd/src/g_canvas.h
View file @
986d511f
...
...
@@ -180,7 +180,7 @@ struct _glist
struct
_glist
*
gl_owner
;
/* parent glist, supercanvas, or 0 if none */
int
gl_pixwidth
;
/* width in pixels (on parent, if a graph) */
int
gl_pixheight
;
t_float
gl_x1
;
/* bounding rectangle in our own coordinates */
t_float
gl_x1
;
/* bounding rectangle in our own coordinates */
t_float
gl_y1
;
t_float
gl_x2
;
t_float
gl_y2
;
...
...
pd/src/g_text.c
View file @
986d511f
...
...
@@ -288,11 +288,14 @@ void canvas_howputnew(t_canvas *x, int *connectp, int *xpixp, int *ypixp,
{
t_gobj
*
g
,
*
selected
=
x
->
gl_editor
->
e_selection
->
sel_what
;
t_text
*
t
=
(
t_text
*
)
selected
;
// if selected object has not yet been activated we need to recreate it first
// if selected object has not yet been activated we need to
// recreate it first
if
(
pd_class
(
&
t
->
te_pd
)
==
text_class
&&
t
->
te_type
!=
T_TEXT
)
{
glist_noselect
(
x
);
// we do this to explicitly activate object
glist_select
(
x
,
glist_nth
(
x
,
glist_getindex
(
x
,
0
)
-
1
));
// then reselect it
// we do this to explicitly activate object...
glist_noselect
(
x
);
// then reselect it
glist_select
(
x
,
glist_nth
(
x
,
glist_getindex
(
x
,
0
)
-
1
));
selected
=
x
->
gl_editor
->
e_selection
->
sel_what
;
}
for
(
g
=
x
->
gl_list
,
nobj
=
0
;
g
;
g
=
g
->
g_next
,
nobj
++
)
...
...
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