fix crash when resetting an edited board
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
#include "state.hpp"
|
#include "state.hpp"
|
||||||
#include "config.hpp"
|
#include "config.hpp"
|
||||||
|
#include "distance.hpp"
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <ios>
|
#include <ios>
|
||||||
@ -50,7 +51,6 @@ auto StateManager::LoadPreset(int preset) -> void {
|
|||||||
auto StateManager::ResetState() -> void {
|
auto StateManager::ResetState() -> void {
|
||||||
current_state = presets.at(current_preset);
|
current_state = presets.at(current_preset);
|
||||||
previous_state = current_state;
|
previous_state = current_state;
|
||||||
FindTargetPath();
|
|
||||||
if (edited) {
|
if (edited) {
|
||||||
// We also need to clear the graph in case the state has been edited
|
// We also need to clear the graph in case the state has been edited
|
||||||
// because the graph could contain states that are impossible to reach
|
// because the graph could contain states that are impossible to reach
|
||||||
|
|||||||
Reference in New Issue
Block a user