GameOfLife: Clear the selected pattern when the game starts running

This commit is contained in:
Tim Ledbetter 2023-09-19 21:54:46 +01:00 committed by Andreas Kling
parent 4b48757586
commit 6eaae726fa
Notes: sideshowbarker 2024-07-18 04:38:32 +09:00

View File

@ -78,6 +78,12 @@ void BoardWidget::set_running(bool running)
if (running == m_running)
return;
if (m_selected_pattern) {
m_selected_pattern = nullptr;
if (on_pattern_selection_state_change)
on_pattern_selection_state_change();
}
m_running = running;
if (m_running) {