- float x_val = gui->affected_x->get_value();
- float y_val = gui->affected_y->get_value();
- float z_val = gui->affected_z->get_value();
+ CWindowToolGUI *tool_gui = !gui->tool_panel ? 0 : gui->tool_panel->tool_gui;
+ int edge = tool_gui ? tool_gui->edge : 0;
+ int span = tool_gui ? tool_gui->span : 0;
+
+ float x_val = gui->affected_x->get_value(edge);
+ float y_val = gui->affected_y->get_value(edge);
+ float z_val = gui->affected_z->get_value(edge);