Merge pull request #82370 from YuriSizov/graphs-request-rename-close-delete-please
Rename close requests to delete requests in `GraphEdit`
This commit is contained in:
commit
bc118b36ac
9 changed files with 42 additions and 37 deletions
|
|
@ -170,7 +170,7 @@ void AnimationNodeBlendTreeEditor::update_graph() {
|
|||
name->connect("text_changed", callable_mp(this, &AnimationNodeBlendTreeEditor::_node_rename_lineedit_changed), CONNECT_DEFERRED);
|
||||
base = 1;
|
||||
agnode->set_closable(true);
|
||||
node->connect("close_request", callable_mp(this, &AnimationNodeBlendTreeEditor::_close_request).bind(E), CONNECT_DEFERRED);
|
||||
node->connect("delete_request", callable_mp(this, &AnimationNodeBlendTreeEditor::_delete_node_request).bind(E), CONNECT_DEFERRED);
|
||||
}
|
||||
|
||||
for (int i = 0; i < agnode->get_input_count(); i++) {
|
||||
|
|
@ -494,7 +494,7 @@ void AnimationNodeBlendTreeEditor::_anim_selected(int p_index, Array p_options,
|
|||
undo_redo->commit_action();
|
||||
}
|
||||
|
||||
void AnimationNodeBlendTreeEditor::_close_request(const String &p_which) {
|
||||
void AnimationNodeBlendTreeEditor::_delete_node_request(const String &p_which) {
|
||||
if (read_only) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -518,7 +518,7 @@ void AnimationNodeBlendTreeEditor::_close_request(const String &p_which) {
|
|||
undo_redo->commit_action();
|
||||
}
|
||||
|
||||
void AnimationNodeBlendTreeEditor::_close_nodes_request(const TypedArray<StringName> &p_nodes) {
|
||||
void AnimationNodeBlendTreeEditor::_delete_nodes_request(const TypedArray<StringName> &p_nodes) {
|
||||
if (read_only) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -552,7 +552,7 @@ void AnimationNodeBlendTreeEditor::_close_nodes_request(const TypedArray<StringN
|
|||
undo_redo->create_action(TTR("Delete Node(s)"));
|
||||
|
||||
for (const StringName &F : to_erase) {
|
||||
_close_request(F);
|
||||
_delete_node_request(F);
|
||||
}
|
||||
|
||||
undo_redo->commit_action();
|
||||
|
|
@ -1057,7 +1057,7 @@ AnimationNodeBlendTreeEditor::AnimationNodeBlendTreeEditor() {
|
|||
graph->connect("disconnection_request", callable_mp(this, &AnimationNodeBlendTreeEditor::_disconnection_request), CONNECT_DEFERRED);
|
||||
graph->connect("node_selected", callable_mp(this, &AnimationNodeBlendTreeEditor::_node_selected));
|
||||
graph->connect("scroll_offset_changed", callable_mp(this, &AnimationNodeBlendTreeEditor::_scroll_changed));
|
||||
graph->connect("close_nodes_request", callable_mp(this, &AnimationNodeBlendTreeEditor::_close_nodes_request));
|
||||
graph->connect("delete_nodes_request", callable_mp(this, &AnimationNodeBlendTreeEditor::_delete_nodes_request));
|
||||
graph->connect("popup_request", callable_mp(this, &AnimationNodeBlendTreeEditor::_popup_request));
|
||||
graph->connect("connection_to_empty", callable_mp(this, &AnimationNodeBlendTreeEditor::_connection_to_empty));
|
||||
graph->connect("connection_from_empty", callable_mp(this, &AnimationNodeBlendTreeEditor::_connection_from_empty));
|
||||
|
|
|
|||
|
|
@ -109,8 +109,8 @@ class AnimationNodeBlendTreeEditor : public AnimationTreeNodeEditorPlugin {
|
|||
void _node_selected(Object *p_node);
|
||||
void _open_in_editor(const String &p_which);
|
||||
void _anim_selected(int p_index, Array p_options, const String &p_node);
|
||||
void _close_request(const String &p_which);
|
||||
void _close_nodes_request(const TypedArray<StringName> &p_nodes);
|
||||
void _delete_node_request(const String &p_which);
|
||||
void _delete_nodes_request(const TypedArray<StringName> &p_nodes);
|
||||
|
||||
bool _update_filters(const Ref<AnimationNode> &anode);
|
||||
void _inspect_filters(const String &p_which);
|
||||
|
|
|
|||
|
|
@ -453,7 +453,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
|
|||
// All nodes are closable except the output node.
|
||||
if (p_id >= 2) {
|
||||
vsnode->set_closable(true);
|
||||
node->connect("close_request", callable_mp(editor, &VisualShaderEditor::_close_node_request).bind(p_type, p_id), CONNECT_DEFERRED);
|
||||
node->connect("delete_request", callable_mp(editor, &VisualShaderEditor::_delete_node_request).bind(p_type, p_id), CONNECT_DEFERRED);
|
||||
}
|
||||
graph->add_child(node);
|
||||
node->set_theme(vstheme);
|
||||
|
|
@ -3852,7 +3852,7 @@ void VisualShaderEditor::_convert_constants_to_parameters(bool p_vice_versa) {
|
|||
undo_redo->commit_action();
|
||||
}
|
||||
|
||||
void VisualShaderEditor::_close_node_request(int p_type, int p_node) {
|
||||
void VisualShaderEditor::_delete_node_request(int p_type, int p_node) {
|
||||
Ref<VisualShaderNode> node = visual_shader->get_node((VisualShader::Type)p_type, p_node);
|
||||
if (!node->is_closable()) {
|
||||
return;
|
||||
|
|
@ -3867,7 +3867,7 @@ void VisualShaderEditor::_close_node_request(int p_type, int p_node) {
|
|||
undo_redo->commit_action();
|
||||
}
|
||||
|
||||
void VisualShaderEditor::_close_nodes_request(const TypedArray<StringName> &p_nodes) {
|
||||
void VisualShaderEditor::_delete_nodes_request(const TypedArray<StringName> &p_nodes) {
|
||||
List<int> to_erase;
|
||||
|
||||
if (p_nodes.is_empty()) {
|
||||
|
|
@ -4898,7 +4898,7 @@ void VisualShaderEditor::_node_menu_id_pressed(int p_idx) {
|
|||
_paste_nodes(true, menu_point);
|
||||
break;
|
||||
case NodeMenuOptions::DELETE:
|
||||
_close_nodes_request(TypedArray<StringName>());
|
||||
_delete_nodes_request(TypedArray<StringName>());
|
||||
break;
|
||||
case NodeMenuOptions::DUPLICATE:
|
||||
_duplicate_nodes();
|
||||
|
|
@ -5198,7 +5198,7 @@ VisualShaderEditor::VisualShaderEditor() {
|
|||
graph->connect("duplicate_nodes_request", callable_mp(this, &VisualShaderEditor::_duplicate_nodes));
|
||||
graph->connect("copy_nodes_request", callable_mp(this, &VisualShaderEditor::_copy_nodes).bind(false));
|
||||
graph->connect("paste_nodes_request", callable_mp(this, &VisualShaderEditor::_paste_nodes).bind(false, Point2()));
|
||||
graph->connect("close_nodes_request", callable_mp(this, &VisualShaderEditor::_close_nodes_request));
|
||||
graph->connect("delete_nodes_request", callable_mp(this, &VisualShaderEditor::_delete_nodes_request));
|
||||
graph->connect("gui_input", callable_mp(this, &VisualShaderEditor::_graph_gui_input));
|
||||
graph->connect("connection_to_empty", callable_mp(this, &VisualShaderEditor::_connection_to_empty));
|
||||
graph->connect("connection_from_empty", callable_mp(this, &VisualShaderEditor::_connection_from_empty));
|
||||
|
|
|
|||
|
|
@ -380,8 +380,8 @@ class VisualShaderEditor : public VBoxContainer {
|
|||
void _node_selected(Object *p_node);
|
||||
|
||||
void _delete_nodes(int p_type, const List<int> &p_nodes);
|
||||
void _close_node_request(int p_type, int p_node);
|
||||
void _close_nodes_request(const TypedArray<StringName> &p_nodes);
|
||||
void _delete_node_request(int p_type, int p_node);
|
||||
void _delete_nodes_request(const TypedArray<StringName> &p_nodes);
|
||||
|
||||
void _node_changed(int p_id);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue