Commit 7c63d021 authored by Claes Sjofors's avatar Claes Sjofors

Ge, fix in cleaning after DigSwap

parent 5fe7e607
......@@ -55,3 +55,4 @@ subterminated <Subwindow is terminated> /info
name_long <Name is too long> /error
name_invchar <Invalid character for name> /error
name_alrexist <Name already exist> /error
swapterminated <Ctx is swapped> /info
......@@ -1959,7 +1959,7 @@ int GeDyn::scan( grow_tObject object)
for ( GeDynElem *elem = elements; elem; elem = elem->next) {
sts = elem->scan( object);
if ( sts == GE__NO_PROPAGATE || sts == GLOW__TERMINATED ||
sts == GLOW__SUBTERMINATED)
sts == GLOW__SUBTERMINATED || sts == GLOW__SWAPTERMINATED)
return sts;
}
return 1;
......@@ -1972,7 +1972,7 @@ int GeDyn::action( grow_tObject object, glow_tEvent event)
for ( GeDynElem *elem = elements; elem; elem = elem->next) {
sts = elem->action( object, event);
if ( sts == GE__NO_PROPAGATE || sts == GLOW__TERMINATED ||
sts == GLOW__SUBTERMINATED)
sts == GLOW__SUBTERMINATED || sts == GLOW__SWAPTERMINATED)
return sts;
}
return 1;
......@@ -1987,7 +1987,7 @@ int GeDyn::confirmed_action( grow_tObject object, glow_tEvent event)
for ( GeDynElem *elem = elements; elem; elem = elem->next) {
sts = elem->action( object, event);
if ( sts == GE__NO_PROPAGATE || sts == GLOW__TERMINATED ||
sts == GLOW__SUBTERMINATED)
sts == GLOW__SUBTERMINATED || sts == GLOW__SWAPTERMINATED)
return sts;
}
......@@ -7476,7 +7476,7 @@ int GeDigSwap::scan( grow_tObject object)
dyn->graph->swap(0);
dyn->graph->swap(1);
grow_Redraw( dyn->graph->grow->ctx);
return GLOW__TERMINATED;
return GLOW__SWAPTERMINATED;
}
old_value = val;
......@@ -19321,7 +19321,7 @@ int GeCatchSignal::action( grow_tObject object, glow_tEvent event)
e.object.object = object;
sts = dyn->action( object, &e);
if ( sts == GE__NO_PROPAGATE || sts == GLOW__TERMINATED ||
sts == GLOW__SUBTERMINATED)
sts == GLOW__SUBTERMINATED || sts == GLOW__SWAPTERMINATED)
return sts;
break;
}
......
......@@ -3780,7 +3780,8 @@ static int graph_trace_scan_bc( grow_tObject object, void *p)
return 1;
sts = dyn->scan( object);
if ( sts == GLOW__TERMINATED || sts == GLOW__SUBTERMINATED)
if ( sts == GLOW__TERMINATED || sts == GLOW__SUBTERMINATED ||
sts == GLOW__SWAPTERMINATED)
return sts;
return 1;
......@@ -4096,7 +4097,7 @@ static int graph_trace_grow_cb( GlowCtx *ctx, glow_tEvent event)
sts = dyn->action( event->object.object, event);
if ( sts == GLOW__TERMINATED)
return sts;
else if ( sts == GLOW__SUBTERMINATED) {
else if ( sts == GLOW__SUBTERMINATED || sts == GLOW__SWAPTERMINATED) {
if ( ctx_popped)
graph->grow->push();
return sts;
......@@ -4263,7 +4264,9 @@ static int graph_trace_grow_cb( GlowCtx *ctx, glow_tEvent event)
grow_GetUserData( event->signal.object, (void **)&dyn);
sts = dyn->action( event->signal.object, event);
if ( sts == GLOW__TERMINATED || sts == GLOW__SUBTERMINATED) {
if ( sts == GLOW__TERMINATED)
return GLOW__NO_PROPAGATE;
else if ( sts == GLOW__SUBTERMINATED || sts == GLOW__SWAPTERMINATED) {
if ( ctx_popped)
graph->grow->push();
return GLOW__NO_PROPAGATE;
......
......@@ -1873,7 +1873,7 @@ int GlowArray::trace_scan()
for ( int i = 0; i < a_size; i++) {
sts = a[i]->trace_scan();
if ( sts == GLOW__TERMINATED || sts == GLOW__SUBTERMINATED)
if ( sts == GLOW__TERMINATED || sts == GLOW__SUBTERMINATED || sts == GLOW__SWAPTERMINATED)
return sts;
}
return 1;
......
......@@ -1748,7 +1748,7 @@ int GlowCtx::trace_scan()
return 1;
sts = a.trace_scan();
if ( sts == GLOW__TERMINATED || sts == GLOW__SUBTERMINATED)
if ( sts == GLOW__TERMINATED || sts == GLOW__SUBTERMINATED || sts == GLOW__SWAPTERMINATED)
return sts;
if ( ctx_type == glow_eCtxType_Grow)
......
......@@ -1968,7 +1968,7 @@ int GrowCtx::event_handler( glow_eEvent event, int x, int y, int w, int h)
if ( callback_object_type != glow_eObjectType_NoObject)
e.object.object = callback_object;
sts = event_callback[event]( this, &e);
if ( sts == GLOW__TERMINATED || sts == GLOW__SUBTERMINATED)
if ( sts == GLOW__TERMINATED || sts == GLOW__SUBTERMINATED || sts == GLOW__SWAPTERMINATED)
return sts;
}
return 1;
......
......@@ -158,7 +158,7 @@ int GrowGroup::trace_scan()
if ( trace.p && ctx->trace_scan_func) {
sts = ctx->trace_scan_func( (void *) this, trace.p);
if ( sts == GLOW__TERMINATED || sts == GLOW__SUBTERMINATED)
if ( sts == GLOW__TERMINATED || sts == GLOW__SUBTERMINATED || sts == GLOW__SWAPTERMINATED)
return sts;
}
......
......@@ -166,7 +166,7 @@ int GrowToolbar::trace_scan()
if ( trace.p && ctx->trace_scan_func) {
sts = ctx->trace_scan_func( (void *) this, trace.p);
if ( sts == GLOW__TERMINATED || sts == GLOW__SUBTERMINATED)
if ( sts == GLOW__TERMINATED || sts == GLOW__SUBTERMINATED || sts == GLOW__SWAPTERMINATED)
return sts;
}
return nc->a.trace_scan();
......
......@@ -393,7 +393,8 @@ int GrowWindow::trace_scan()
if ( trace.p && ctx->trace_scan_func) {
sts = ctx->trace_scan_func( (void *) this, trace.p);
if ( sts == GLOW__TERMINATED || sts == GLOW__SUBTERMINATED)
if ( sts == GLOW__TERMINATED || sts == GLOW__SUBTERMINATED ||
sts == GLOW__SWAPTERMINATED)
return sts;
}
......@@ -410,9 +411,14 @@ int GrowWindow::trace_scan()
(ctx->trace_ctrl_func) ( glow_eTraceCtrl_CtxPop, window_ctx);
sts = window_ctx->trace_scan();
if ( sts == GLOW__TERMINATED || sts == GLOW__SUBTERMINATED)
if ( sts == GLOW__TERMINATED)
return sts;
else if ( sts == GLOW__SUBTERMINATED || sts == GLOW__SWAPTERMINATED) {
if ( ctx->trace_ctrl_func)
(ctx->trace_ctrl_func) ( glow_eTraceCtrl_CtxPop, ctx);
ctx->gdraw->reset_clip_rectangle( &ctx->mw);
return sts;
}
if ( ctx->trace_ctrl_func)
(ctx->trace_ctrl_func) ( glow_eTraceCtrl_CtxPush, window_ctx);
......@@ -694,7 +700,7 @@ int GrowWindow::event_handler( GlowWind *w, glow_eEvent event, int x, int y, dou
sts = window_ctx->event_handler( event, x, y, 0, 0);
if ( sts == GLOW__TERMINATED)
return sts;
else if (sts == GLOW__SUBTERMINATED) {
else if (sts == GLOW__SUBTERMINATED || sts == GLOW__SWAPTERMINATED) {
ctx->gdraw->pop_customcolors();
ctx->gdraw->reset_clip_rectangle( &ctx->mw);
return 1;
......
......@@ -411,7 +411,7 @@ int GlowNode::trace_scan()
if ( ctx->trace_scan_func && trace.p) {
sts = ctx->trace_scan_func( (void *) this, trace.p);
if ( sts == GLOW__TERMINATED || sts == GLOW__SUBTERMINATED)
if ( sts == GLOW__TERMINATED || sts == GLOW__SUBTERMINATED || sts == GLOW__SWAPTERMINATED)
return sts;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment