equal
deleted
inserted
replaced
552 active_edge=i; |
552 active_edge=i; |
553 } |
553 } |
554 } |
554 } |
555 } |
555 } |
556 |
556 |
|
557 // return if the clicked object is neither an edge nor a node |
|
558 if (active_edge == INVALID) return false; |
|
559 |
557 //recolor activated item |
560 //recolor activated item |
558 if(active_item) |
561 if(active_item) |
559 { |
562 { |
560 *active_item << Gnome::Canvas::Properties::fill_color("red"); |
563 *active_item << Gnome::Canvas::Properties::fill_color("red"); |
561 } |
564 } |
594 deleteItem(*edge_set_it); |
597 deleteItem(*edge_set_it); |
595 } |
598 } |
596 deleteItem(active_node); |
599 deleteItem(active_node); |
597 } |
600 } |
598 //a simple edge was chosen |
601 //a simple edge was chosen |
599 else |
602 else if (active_edge != INVALID) |
600 { |
603 { |
601 deleteItem(active_edge); |
604 deleteItem(active_edge); |
602 } |
605 } |
603 } |
606 } |
604 //pointer was moved, deletion is cancelled |
607 //pointer was moved, deletion is cancelled |
606 { |
609 { |
607 if(active_node!=INVALID) |
610 if(active_node!=INVALID) |
608 { |
611 { |
609 *active_item << Gnome::Canvas::Properties::fill_color("blue"); |
612 *active_item << Gnome::Canvas::Properties::fill_color("blue"); |
610 } |
613 } |
611 else |
614 else if (active_edge != INVALID) |
612 { |
615 { |
613 *active_item << Gnome::Canvas::Properties::fill_color("green"); |
616 *active_item << Gnome::Canvas::Properties::fill_color("green"); |
614 } |
617 } |
615 } |
618 } |
616 } |
619 } |