return 0;
}
+
void pick_node_from_coords(float x, float y, float z)
{
topview_node *n;
float a, b, c;
double d;
int ind;
+ int selnodes=atoi(agget(view->g[view->activeGraph],"nodesselectable"));
+ int seledges=atoi(agget(view->g[view->activeGraph],"edgesselectable"));
sn = (topview_node *) 0;
se = (topview_edge *) 0;
- for (ind = 0; ind < view->Topview->Nodecount; ind++) {
+ for (ind = 0;( (selnodes)&&(ind < view->Topview->Nodecount)); ind++) {
n = &view->Topview->Nodes[ind];
- if (!n->data.Visible)
- continue;
+ if (!select_node)
+ break;
+
a = ABS(n->distorted_x - view->mouse.GLpos.x);
b = ABS(n->distorted_y - view->mouse.GLpos.y);
}
}
- for (ind = 0; ind < view->Topview->Edgecount; ind++) {
+ for (ind = 0; ((seledges)&&(ind < view->Topview->Edgecount)); ind++) {
point3f p1, p2, p3;
e = &view->Topview->Edges[ind];
if (!e->data.Visible)
}
}
- if (closest_dif < closest_dif2 * 3) {
+ if ((closest_dif < closest_dif2 * 3) )
+ {
if (sn) {
if (!is_node_picked(sn))
add_to_pick_list(sn);
}
void rectangle_select(ViewInfo* v)
{
- node_rectangle_select(v);
- edge_rectangle_select(v);
+ int selnodes=atoi(agget(view->g[view->activeGraph],"nodesselectable"));
+ int seledges=atoi(agget(view->g[view->activeGraph],"edgesselectable"));
+ if(selnodes)
+ node_rectangle_select(v);
+ if(seledges)
+ edge_rectangle_select(v);
}
graph[check_box_gridvisible="settingsChkBox3"];\r
graph[check_box_drawnodes="settingsChkBox5-1"];\r
graph[check_box_drawedges="settingsChkBox5-2"];\r
+ graph[check_box_edgesselectable="chkboxEdgeSelect"];\r
+ graph[check_box_nodesselectable="chkboxNodeSelect"];\r
graph[combobox_labelglutfont="labelfont"];\r
graph[combobox_defaultnodeshape="settingscombobox1"];\r
graph[combobox_colortheme="colorthemecb"];\r