equal
deleted
inserted
replaced
70 GraphDisplayerCanvas::~GraphDisplayerCanvas() |
70 GraphDisplayerCanvas::~GraphDisplayerCanvas() |
71 { |
71 { |
72 for (NodeIt n((mytab.mapstorage).graph); n != INVALID; ++n) |
72 for (NodeIt n((mytab.mapstorage).graph); n != INVALID; ++n) |
73 { |
73 { |
74 delete nodesmap[n]; |
74 delete nodesmap[n]; |
75 delete nodetextmap[n]; |
75 // delete nodetextmap[n]; |
76 } |
76 } |
77 |
77 |
78 for (EdgeIt e((mytab.mapstorage).graph); e != INVALID; ++e) |
78 for (EdgeIt e((mytab.mapstorage).graph); e != INVALID; ++e) |
79 { |
79 { |
80 delete edgesmap[e]; |
80 delete edgesmap[e]; |
81 delete edgetextmap[e]; |
81 // delete edgetextmap[e]; |
82 } |
82 } |
83 } |
83 } |
84 |
84 |
85 void GraphDisplayerCanvas::propertyChange(bool itisedge, int prop) |
85 void GraphDisplayerCanvas::propertyChange(bool itisedge, int prop) |
86 { |
86 { |
220 //initializing edge-text as well, to empty string |
220 //initializing edge-text as well, to empty string |
221 |
221 |
222 XY text_pos=mytab.mapstorage.arrow_pos[i]; |
222 XY text_pos=mytab.mapstorage.arrow_pos[i]; |
223 text_pos+=(XY(10,10)); |
223 text_pos+=(XY(10,10)); |
224 |
224 |
225 edgetextmap[i]=new Gnome::Canvas::Text(displayed_graph, text_pos.x, text_pos.y, ""); |
225 // edgetextmap[i]=new Gnome::Canvas::Text(displayed_graph, text_pos.x, text_pos.y, ""); |
226 edgetextmap[i]->property_fill_color().set_value("darkgreen"); |
226 // edgetextmap[i]->property_fill_color().set_value("darkgreen"); |
227 edgetextmap[i]->signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::mapEditEventHandler), false); |
227 // edgetextmap[i]->signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::mapEditEventHandler), false); |
228 edgetextmap[i]->raise_to_top(); |
228 // edgetextmap[i]->raise_to_top(); |
229 } |
229 } |
230 |
230 |
231 //afterwards nodes come to be drawn |
231 //afterwards nodes come to be drawn |
232 |
232 |
233 for (NodeIt i((mytab.mapstorage).graph); i!=INVALID; ++i) |
233 for (NodeIt i((mytab.mapstorage).graph); i!=INVALID; ++i) |
248 |
248 |
249 XY text_pos( |
249 XY text_pos( |
250 ((mytab.mapstorage).coords[i].x+node_property_defaults[N_RADIUS]+5), |
250 ((mytab.mapstorage).coords[i].x+node_property_defaults[N_RADIUS]+5), |
251 ((mytab.mapstorage).coords[i].y+node_property_defaults[N_RADIUS]+5)); |
251 ((mytab.mapstorage).coords[i].y+node_property_defaults[N_RADIUS]+5)); |
252 |
252 |
253 nodetextmap[i]=new Gnome::Canvas::Text(displayed_graph, |
253 // nodetextmap[i]=new Gnome::Canvas::Text(displayed_graph, |
254 text_pos.x, text_pos.y, ""); |
254 // text_pos.x, text_pos.y, ""); |
255 nodetextmap[i]->property_fill_color().set_value("darkblue"); |
255 // nodetextmap[i]->property_fill_color().set_value("darkblue"); |
256 nodetextmap[i]->signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::mapEditEventHandler), false); |
256 // nodetextmap[i]->signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::mapEditEventHandler), false); |
257 nodetextmap[i]->raise_to_top(); |
257 // nodetextmap[i]->raise_to_top(); |
258 } |
258 } |
259 |
259 |
260 is_drawn=true; |
260 is_drawn=true; |
261 |
261 |
262 //upon drawing graph |
262 //upon drawing graph |
282 forming_edge=INVALID; |
282 forming_edge=INVALID; |
283 |
283 |
284 for (NodeIt n((mytab.mapstorage).graph); n != INVALID; ++n) |
284 for (NodeIt n((mytab.mapstorage).graph); n != INVALID; ++n) |
285 { |
285 { |
286 delete nodesmap[n]; |
286 delete nodesmap[n]; |
287 delete nodetextmap[n]; |
287 // delete nodetextmap[n]; |
288 } |
288 } |
289 |
289 |
290 for (EdgeIt e((mytab.mapstorage).graph); e != INVALID; ++e) |
290 for (EdgeIt e((mytab.mapstorage).graph); e != INVALID; ++e) |
291 { |
291 { |
292 delete edgesmap[e]; |
292 delete edgesmap[e]; |
293 delete edgetextmap[e]; |
293 // delete edgetextmap[e]; |
294 } |
294 } |
295 |
295 |
296 is_drawn=false; |
296 is_drawn=false; |
297 } |
297 } |
298 |
298 |