TravelMapping / EduTools

Educational tools using TravelMapping data
3 stars 21 forks source link

HDX/AV: initWaypointsAndConnections called twice when AV starts #540

Open jteresco opened 1 year ago

jteresco commented 1 year ago

Can we remove the call in algOptionsDonePressed that shows all vertices and edges since it's being called in startPausePressed when an AV is started?

MikePlekan commented 1 year ago

It can be removed from algOptionsDonePressed but it does not redraw to black after hitting "visualize". It only turns black once the user hits "start". This ties back into a behavioral change talked about in #434.

jteresco commented 1 year ago

Quick thought: keep it in algOptionsDonePressed, but honor the booleans about whether the selected AV uses waypoints and/or connections, eliminating the need to have this done in startPausePressed. Should also check to see if any AVs do this in their START action.

MikePlekan commented 1 year ago

No AVs call the function in the START action, there are quite a few that are recoloring the entire graph in other colors which brings up another idea of making the function only do background init tasks and not recolor everything. Which would leave the coloring up to the AV to do.

jteresco commented 1 year ago

One consideration: if not the first AV selected or not the first run of the selected AV, we might want to clean up whatever the previous AV did when "New Algorithm" is pressed.