mirror of
https://github.com/godotengine/godot.git
synced 2025-10-25 18:54:43 +00:00
shader editor context menu and line operations and style fix
This commit is contained in:
parent
fc299b4f37
commit
94b3e786cd
5 changed files with 385 additions and 62 deletions
|
|
@ -850,7 +850,8 @@ void ScriptTextEditor::_edit_option(int p_op) {
|
|||
if (line_id == 0 || next_id < 0)
|
||||
return;
|
||||
|
||||
swap_lines(tx, line_id, next_id);
|
||||
tx->swap_lines(line_id, next_id);
|
||||
tx->cursor_set_line(next_id);
|
||||
}
|
||||
int from_line_up = from_line > 0 ? from_line - 1 : from_line;
|
||||
int to_line_up = to_line > 0 ? to_line - 1 : to_line;
|
||||
|
|
@ -862,7 +863,8 @@ void ScriptTextEditor::_edit_option(int p_op) {
|
|||
if (line_id == 0 || next_id < 0)
|
||||
return;
|
||||
|
||||
swap_lines(tx, line_id, next_id);
|
||||
tx->swap_lines(line_id, next_id);
|
||||
tx->cursor_set_line(next_id);
|
||||
}
|
||||
tx->end_complex_operation();
|
||||
tx->update();
|
||||
|
|
@ -889,7 +891,8 @@ void ScriptTextEditor::_edit_option(int p_op) {
|
|||
if (line_id == tx->get_line_count() - 1 || next_id > tx->get_line_count())
|
||||
return;
|
||||
|
||||
swap_lines(tx, line_id, next_id);
|
||||
tx->swap_lines(line_id, next_id);
|
||||
tx->cursor_set_line(next_id);
|
||||
}
|
||||
int from_line_down = from_line < tx->get_line_count() ? from_line + 1 : from_line;
|
||||
int to_line_down = to_line < tx->get_line_count() ? to_line + 1 : to_line;
|
||||
|
|
@ -901,7 +904,8 @@ void ScriptTextEditor::_edit_option(int p_op) {
|
|||
if (line_id == tx->get_line_count() - 1 || next_id > tx->get_line_count())
|
||||
return;
|
||||
|
||||
swap_lines(tx, line_id, next_id);
|
||||
tx->swap_lines(line_id, next_id);
|
||||
tx->cursor_set_line(next_id);
|
||||
}
|
||||
tx->end_complex_operation();
|
||||
tx->update();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue