Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Wynn
purr-data
Commits
0386c2a1
Commit
0386c2a1
authored
Oct 04, 2012
by
Ivica Ico Bukvic
Browse files
preemptively added fix for objects not being reselected after being redrawn
parent
56057ec1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/g_canvas.c
View file @
0386c2a1
...
@@ -15,6 +15,7 @@ to be different but are now unified except for some fossilized names.) */
...
@@ -15,6 +15,7 @@ to be different but are now unified except for some fossilized names.) */
#include
"g_all_guis.h"
#include
"g_all_guis.h"
#include
<string.h>
#include
<string.h>
extern
int
do_not_redraw
;
/* LATER consider adding font size to this struct (see glist_getfont()) */
/* LATER consider adding font size to this struct (see glist_getfont()) */
struct
_canvasenvironment
struct
_canvasenvironment
...
@@ -800,6 +801,7 @@ void canvas_map(t_canvas *x, t_floatarg f)
...
@@ -800,6 +801,7 @@ void canvas_map(t_canvas *x, t_floatarg f)
void
canvas_redraw
(
t_canvas
*
x
)
void
canvas_redraw
(
t_canvas
*
x
)
{
{
if
(
do_not_redraw
)
return
;
//fprintf(stderr,"canvas_redraw\n");
//fprintf(stderr,"canvas_redraw\n");
if
(
glist_isvisible
(
x
))
if
(
glist_isvisible
(
x
))
{
{
...
@@ -1478,6 +1480,7 @@ void *canvas_getblock(t_class *blockclass, t_canvas **canvasp)
...
@@ -1478,6 +1480,7 @@ void *canvas_getblock(t_class *blockclass, t_canvas **canvasp)
redraw. Action = 0 for redraw, 1 for draw only, 2 for erase. */
redraw. Action = 0 for redraw, 1 for draw only, 2 for erase. */
static
void
glist_redrawall
(
t_glist
*
gl
,
int
action
)
static
void
glist_redrawall
(
t_glist
*
gl
,
int
action
)
{
{
//fprintf(stderr,"glist_redrawall\n");
t_gobj
*
g
;
t_gobj
*
g
;
int
vis
=
glist_isvisible
(
gl
);
int
vis
=
glist_isvisible
(
gl
);
for
(
g
=
gl
->
gl_list
;
g
;
g
=
g
->
g_next
)
for
(
g
=
gl
->
gl_list
;
g
;
g
=
g
->
g_next
)
...
@@ -1500,6 +1503,9 @@ static void glist_redrawall(t_glist *gl, int action)
...
@@ -1500,6 +1503,9 @@ static void glist_redrawall(t_glist *gl, int action)
else
if
(
g
->
g_pd
==
canvas_class
)
else
if
(
g
->
g_pd
==
canvas_class
)
glist_redrawall
((
t_glist
*
)
g
,
action
);
glist_redrawall
((
t_glist
*
)
g
,
action
);
}
}
if
(
glist_isselected
(
glist_getcanvas
(
gl
),
(
t_gobj
*
)
gl
))
{
sys_vgui
(
"pdtk_select_all_gop_widgets .x%lx %lx %d
\n
"
,
glist_getcanvas
(
gl
),
gl
,
1
);
}
}
}
/* public interface for above. */
/* public interface for above. */
...
@@ -1515,6 +1521,7 @@ void canvas_redrawallfortemplate(t_template *template, int action)
...
@@ -1515,6 +1521,7 @@ void canvas_redrawallfortemplate(t_template *template, int action)
for that */
for that */
void
canvas_redrawallfortemplatecanvas
(
t_canvas
*
x
,
int
action
)
void
canvas_redrawallfortemplatecanvas
(
t_canvas
*
x
,
int
action
)
{
{
//fprintf(stderr,"canvas_redrawallfortemplatecanvas\n");
t_gobj
*
g
;
t_gobj
*
g
;
t_template
*
tmpl
;
t_template
*
tmpl
;
t_symbol
*
s1
=
gensym
(
"struct"
);
t_symbol
*
s1
=
gensym
(
"struct"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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