Skip to content

Commit

Permalink
Add a boolean setting to show the 'arrange' button in the UI.
Browse files Browse the repository at this point in the history
  • Loading branch information
fire authored and Naros committed Jul 10, 2024
1 parent f7e000a commit 2b12f63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/common/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ void OrchestratorSettings::_register_settings()
_settings.emplace_back(BOOL_SETTING("ui/graph/disconnect_control_flow_when_dragged", true));
_settings.emplace_back(BOOL_SETTING("ui/graph/show_autowire_selection_dialog", true));
_settings.emplace_back(BOOL_SETTING("ui/graph/show_minimap", false));
_settings.emplace_back(BOOL_SETTING("ui/graph/show_arrange_button", false));
_settings.emplace_back(BOOL_SETTING("ui/graph/show_overlay_action_tooltips", true));
_settings.emplace_back(COLOR_NO_ALPHA_SETTING("ui/graph/knot_selected_color", Color(0.68f, 0.44f, 0.09f)));

Expand Down
3 changes: 2 additions & 1 deletion src/editor/graph/graph_edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ OrchestratorGraphEdit::OrchestratorGraphEdit(OrchestratorPlugin* p_plugin, const

set_name(p_graph->get_graph_name());
set_minimap_enabled(OrchestratorSettings::get_singleton()->get_setting("ui/graph/show_minimap", false));
set_show_arrange_button(OrchestratorSettings::get_singleton()->get_setting("ui/graph/show_arrange_button", false));
set_right_disconnects(true);
set_show_arrange_button(false);

_plugin = p_plugin;
_script_graph = p_graph;
Expand Down Expand Up @@ -1662,6 +1662,7 @@ void OrchestratorGraphEdit::_on_project_settings_changed()
bool node_resizable = os->get_setting("ui/nodes/resizable_by_default", false);

set_minimap_enabled(os->get_setting("ui/graph/show_minimap", false));
set_show_arrange_button(os->get_setting("ui/graph/show_arrange_button", false));

for_each_graph_node([&](OrchestratorGraphNode* node) {
node->show_icons(show_icons);
Expand Down

0 comments on commit 2b12f63

Please sign in to comment.