From a59dc176bf7d26004312636c3ae99ef608a69af8 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Fri, 20 Jun 2025 08:47:31 -0500 Subject: [PATCH] never delete existing talk nodes on cancel edit --- src/scenedit/scen.actions.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/scenedit/scen.actions.cpp b/src/scenedit/scen.actions.cpp index 2a2b7173..87f7e443 100644 --- a/src/scenedit/scen.actions.cpp +++ b/src/scenedit/scen.actions.cpp @@ -536,9 +536,12 @@ static bool handle_rb_action(location the_point, bool option_hit) { break; town->talking.talk_nodes.erase(town->talking.talk_nodes.begin() + j); } else { - if(j == size_before) + bool is_new = false; + if(j == size_before){ + is_new = true; town->talking.talk_nodes.emplace_back(); - if((j = edit_talk_node(j)) >= 0 && town->talking.talk_nodes[j].personality == -1) + } + if((j = edit_talk_node(j)) >= 0 && is_new) town->talking.talk_nodes.erase(town->talking.talk_nodes.begin() + j); } start_dialogue_editing();