From b550471a148d232f50d0d1f03256fc9ef82a52f3 Mon Sep 17 00:00:00 2001 From: Paulb23 Date: Fri, 15 Jul 2016 15:02:55 +0100 Subject: Fixed breakpoint gutter toggle not updating when game is running, issue 5712 --- tools/editor/plugins/script_editor_plugin.cpp | 14 ++++++++++++++ tools/editor/plugins/script_editor_plugin.h | 1 + 2 files changed, 15 insertions(+) (limited to 'tools/editor/plugins') diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp index fc5f552723..162ac39df0 100644 --- a/tools/editor/plugins/script_editor_plugin.cpp +++ b/tools/editor/plugins/script_editor_plugin.cpp @@ -1012,6 +1012,18 @@ void ScriptEditor::swap_lines(TextEdit *tx, int line1, int line2) tx->cursor_set_line(line2); } +void ScriptEditor::_breakpoint_toggled(const int p_row) { + int selected = tab_container->get_current_tab(); + if (selected<0 || selected>=tab_container->get_child_count()) { + return; + } + + ScriptTextEditor *current = tab_container->get_child(selected)->cast_to(); + if (current) { + get_debugger()->set_breakpoint(current->get_edited_script()->get_path(),p_row+1,current->get_text_edit()->is_line_set_as_breakpoint(p_row)); + } +} + void ScriptEditor::_file_dialog_action(String p_file) { switch (file_dialog_option) { @@ -2198,6 +2210,7 @@ void ScriptEditor::edit(const Ref