COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
06/17/05 14:25:53 (15 years ago)
Author:
Hegyi Péter
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1982
Message:

Very small bug is corrected: if node creator tool is active, the small red arrows won't move, if you click on them and if you drag the newly created node... 'was hard to notice it :-)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gui/graph_displayer_canvas.cc

    r1500 r1501  
    66{
    77 
    8   actual_handler=displayed_graph.signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::create_edge_event_handler), false);
     8  actual_handler=signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::create_node_event_handler), false);
     9  actual_tool=CREATE_NODE;
    910
    1011  active_node=INVALID;
     
    2425    coos.push_back(Gnome::Art::Point(cm[g.target(i)].x,cm[g.target(i)].y));
    2526   
    26     edgesmap[i]=new BrokenEdge(displayed_graph, coos);
     27    edgesmap[i]=new BrokenEdge(displayed_graph, coos, *this);
    2728    *(edgesmap[i]) << Gnome::Canvas::Properties::fill_color("green");
    2829    edgesmap[i]->property_width_pixels().set_value(10);   
     
    310311  actual_handler.disconnect();
    311312
     313  if(actual_tool==CREATE_EDGE)
     314    {
     315        GdkEvent * generated=new GdkEvent();
     316        generated->type=GDK_BUTTON_RELEASE;
     317        generated->button.button=3;
     318        create_edge_event_handler(generated);     
     319    }
     320
     321  actual_tool=newtool;
     322
    312323  switch(newtool)
    313324    {
     
    332343      break;
    333344    }
     345}
     346
     347int GraphDisplayerCanvas::get_actual_tool()
     348{
     349  return actual_tool;
    334350}
    335351
     
    565581
    566582                  //drawing new edge
    567                   edgesmap[active_edge]=new BrokenEdge(displayed_graph, coos);
     583                  edgesmap[active_edge]=new BrokenEdge(displayed_graph, coos, *this);
    568584                  *(edgesmap[active_edge]) << Gnome::Canvas::Properties::fill_color("green");
    569585                  edgesmap[active_edge]->property_width_pixels().set_value(10);
Note: See TracChangeset for help on using the changeset viewer.