Commit 7de394cb authored by claes's avatar claes

Bugfix in select of reference connections

parent d2b7663e
...@@ -479,16 +479,21 @@ void FlowCon::set_hot( int on) ...@@ -479,16 +479,21 @@ void FlowCon::set_hot( int on)
void FlowCon::select_region_insert( double ll_x, double ll_y, double ur_x, void FlowCon::select_region_insert( double ll_x, double ll_y, double ur_x,
double ur_y) double ur_y)
{ {
if ( ctx->select_policy == flow_eSelectPolicy_Surround) if ( temporary_ref || cc->con_type == flow_eConType_Reference) {
{ // Allways surround
if ( x_left > ll_x && x_right < ur_x && y_high < ur_y && y_low > ll_y) if ( x_left > ll_x && x_right < ur_x && y_high < ur_y && y_low > ll_y)
ctx->select_insert( this); ctx->select_insert( this);
} }
else else {
{ if ( ctx->select_policy == flow_eSelectPolicy_Surround) {
if ( x_left > ll_x && x_right < ur_x && y_high < ur_y && y_low > ll_y)
ctx->select_insert( this);
}
else {
if ( x_right > ll_x && x_left < ur_x && y_low < ur_y && y_high > ll_y) if ( x_right > ll_x && x_left < ur_x && y_low < ur_y && y_high > ll_y)
ctx->select_insert( this); ctx->select_insert( this);
} }
}
} }
void FlowCon::zoom() void FlowCon::zoom()
...@@ -3311,7 +3316,7 @@ int FlowCon::event_handler( flow_eEvent event, int x, int y) ...@@ -3311,7 +3316,7 @@ int FlowCon::event_handler( flow_eEvent event, int x, int y)
{ {
case flow_eEvent_CursorMotion: case flow_eEvent_CursorMotion:
if ( temporary_ref || cc->con_type == flow_eConType_Reference) if ( temporary_ref || cc->con_type == flow_eConType_Reference)
sts = ref_a.event_handler( &cc->zero, event, x, y, 0); sts = ref_a.event_handler( &cc->zero, event, x, y, ref_a.size());
else else
sts = line_a.event_handler( &cc->zero, event, x, y, l_num); sts = line_a.event_handler( &cc->zero, event, x, y, l_num);
if ( sts && !hot && if ( sts && !hot &&
...@@ -3358,7 +3363,7 @@ int FlowCon::event_handler( flow_eEvent event, int x, int y) ...@@ -3358,7 +3363,7 @@ int FlowCon::event_handler( flow_eEvent event, int x, int y)
break; break;
default: default:
if ( temporary_ref || cc->con_type == flow_eConType_Reference) if ( temporary_ref || cc->con_type == flow_eConType_Reference)
sts = ref_a.event_handler( &cc->zero, event, x, y, 0); sts = ref_a.event_handler( &cc->zero, event, x, y, ref_a.size());
else else
sts = line_a.event_handler( &cc->zero, event, x, y, l_num); sts = line_a.event_handler( &cc->zero, event, x, y, l_num);
} }
......
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