Commit 388a4a4d authored by Claes Sjofors's avatar Claes Sjofors

Plc trace, highlight of reference connection when clicked on (refs #174)

parent 77b43241
......@@ -854,4 +854,8 @@ int flow_ConCreateStop( flow_tCtx ctx)
return ctx->con_create_stop();
}
int flow_ConIsReference( flow_tCon con)
{
return ((FlowCon *)con)->is_reference();
}
......@@ -284,6 +284,7 @@ int flow_PendingPaste( flow_tCtx ctx);
int flow_PendingPasteStop( flow_tCtx ctx);
int flow_GetConCreateActive( flow_tCtx ctx);
int flow_ConCreateStop( flow_tCtx ctx);
int flow_ConIsReference( flow_tCon con);
#if defined __cplusplus
......
......@@ -118,6 +118,8 @@ class FlowCon : public FlowArrayElem {
void select_region_insert( double ll_x, double ll_y, double ur_x,
double ur_y);
flow_eObjectType type() { return flow_eObjectType_Con;};
int is_reference() { return temporary_ref || cc->con_type == flow_eConType_Reference;}
double x_right;
double x_left;
double y_high;
......
......@@ -730,6 +730,14 @@ int RtTrace::flow_cb( FlowCtx *ctx, flow_tEvent event)
flow_SelectInsert( ctx, event->object.object);
}
break;
case flow_eObjectType_Con:
if ( flow_ConIsReference( event->object.object)) {
int val;
flow_GetHighlight( event->object.object, &val);
flow_SetHighlight( event->object.object, !val);
}
break;
default:
flow_SelectClear( ctx);
}
......
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