Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Aayush
purr-data
Commits
03ef5d01
Commit
03ef5d01
authored
Sep 13, 2014
by
Ivica Bukvic
Browse files
*made undo+preset hub sync more robust
*fixed preset segfault when doing clear on a hubless node *clean-up
parent
302a88b4
Changes
3
Hide whitespace changes
Inline
Side-by-side
pd/src/g_text.c
View file @
03ef5d01
...
...
@@ -2384,7 +2384,6 @@ void text_setto(t_text *x, t_glist *glist, char *buf, int bufsize, int pos)
//probably don't need this here, but doesn't hurt to leave it in
glob_preset_node_list_seek_hub
();
glob_preset_node_list_check_loc_and_update
();
}
}
...
...
pd/src/g_undo.c
View file @
03ef5d01
...
...
@@ -89,6 +89,7 @@ void canvas_undo_undo(t_canvas *x)
their regular call will fail in case their position needed
to be updated by undo/redo first to reflect the old one */
glob_preset_node_list_seek_hub
();
glob_preset_node_list_check_loc_and_update
();
if
(
glist_isvisible
(
x
)
&&
glist_istoplevel
(
x
))
{
sys_vgui
(
"pdtk_undomenu .x%lx %s %s
\n
"
,
...
...
@@ -133,6 +134,7 @@ void canvas_undo_redo(t_canvas *x)
regular call will fail in case their position needed to be updated
by undo/redo first to reflect the old one */
glob_preset_node_list_seek_hub
();
glob_preset_node_list_check_loc_and_update
();
if
(
glist_isvisible
(
x
)
&&
glist_istoplevel
(
x
))
{
sys_vgui
(
"pdtk_undomenu .x%lx %s %s
\n
"
,
...
...
pd/src/x_preset.c
View file @
03ef5d01
...
...
@@ -656,7 +656,7 @@ void preset_node_clear(t_preset_node *x, t_float f)
{
np1
=
hd2
->
phd_npreset
;
// if it is first one
if
(
np1
->
np_preset
==
(
int
)
f
)
if
(
np1
&&
np1
->
np_preset
==
(
int
)
f
)
{
hd2
->
phd_npreset
=
np1
->
np_next
;
if
(
np1
->
np_val
.
l_n
)
...
...
@@ -687,13 +687,12 @@ void preset_node_clear(t_preset_node *x, t_float f)
}
}
}
SETFLOAT
(
ap
+
0
,
f
);
SETFLOAT
(
ap
+
1
,
(
t_float
)
changed
);
outlet_anything
(
x
->
pn_hub
->
ph_outlet
,
gensym
(
"node_clear"
),
2
,
ap
);
}
if
(
changed
&&
!
x
->
pn_hub
->
ph_extern_file
)
if
(
changed
&&
(
!
x
->
pn_hub
||
!
x
->
pn_hub
->
ph_extern_file
)
)
canvas_dirty
(
x
->
pn_hub
->
ph_canvas
,
1
);
SETFLOAT
(
ap
+
0
,
f
);
SETFLOAT
(
ap
+
1
,
(
t_float
)
changed
);
outlet_anything
(
x
->
pn_hub
->
ph_outlet
,
gensym
(
"node_clear"
),
2
,
ap
);
}
...
...
Write
Preview
Supports
Markdown
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