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
nerrons
purr-data
Commits
82c15e73
Commit
82c15e73
authored
Dec 30, 2013
by
Ivica Bukvic
Browse files
added undo checkpoint when creating a graph object from the put menu
parent
6cfa78ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
pd/src/g_canvas.c
View file @
82c15e73
...
...
@@ -570,6 +570,8 @@ t_glist *glist_addglist(t_glist *g, t_symbol *sym,
return
(
x
);
}
extern
int
we_are_undoing
;
/* call glist_addglist from a Pd message */
void
glist_glist
(
t_glist
*
g
,
t_symbol
*
s
,
int
argc
,
t_atom
*
argv
)
{
...
...
@@ -586,6 +588,9 @@ void glist_glist(t_glist *g, t_symbol *s, int argc, t_atom *argv)
t_float
px2
=
atom_getfloatarg
(
7
,
argc
,
argv
);
t_float
py2
=
atom_getfloatarg
(
8
,
argc
,
argv
);
glist_addglist
(
g
,
sym
,
x1
,
y1
,
x2
,
y2
,
px1
,
py1
,
px2
,
py2
);
if
(
!
we_are_undoing
)
canvas_undo_add
(
glist_getcanvas
(
g
),
9
,
"create"
,
(
void
*
)
canvas_undo_set_create
(
glist_getcanvas
(
g
)));
}
/* return true if the glist should appear as a graph on parent;
...
...
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