diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-03-05 16:59:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-05 16:59:05 +0100 |
commit | f43ee4aff8e5f72c24cfbd8f1ff90703714857e0 (patch) | |
tree | 4eabf3ef15f990e05024206ba461ad16a3158286 | |
parent | 12fefc1a6c19830efb8c85d85b793de711fe12f8 (diff) | |
parent | 9b52ad5cafd66be117b7612c87bd6da92f67a4e9 (diff) |
Merge pull request #26639 from YeldhamDev/tileeditor_coordnav_disable
Disable coord navigation buttons in TileSet editor when no texture is selected
-rw-r--r-- | editor/plugins/tile_set_editor_plugin.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp index 4f511dc19f..5b54384ee0 100644 --- a/editor/plugins/tile_set_editor_plugin.cpp +++ b/editor/plugins/tile_set_editor_plugin.cpp @@ -337,13 +337,13 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) { tools[SELECT_NEXT] = memnew(ToolButton); tool_hb->add_child(tools[SELECT_NEXT]); tool_hb->move_child(tools[SELECT_NEXT], WORKSPACE_CREATE_SINGLE); - tools[SELECT_NEXT]->set_shortcut(ED_SHORTCUT("tileset_editor/next_shape", TTR("Select next coordinate"), KEY_PAGEDOWN)); + tools[SELECT_NEXT]->set_shortcut(ED_SHORTCUT("tileset_editor/next_shape", TTR("Next Coordinate"), KEY_PAGEDOWN)); tools[SELECT_NEXT]->connect("pressed", this, "_on_tool_clicked", varray(SELECT_NEXT)); tools[SELECT_NEXT]->set_tooltip(TTR("Select the next shape, subtile, or Tile.")); tools[SELECT_PREVIOUS] = memnew(ToolButton); tool_hb->add_child(tools[SELECT_PREVIOUS]); tool_hb->move_child(tools[SELECT_PREVIOUS], WORKSPACE_CREATE_SINGLE); - tools[SELECT_PREVIOUS]->set_shortcut(ED_SHORTCUT("tileset_editor/previous_shape", TTR("Select previous coordinate"), KEY_PAGEUP)); + tools[SELECT_PREVIOUS]->set_shortcut(ED_SHORTCUT("tileset_editor/previous_shape", TTR("Previous Coordinate"), KEY_PAGEUP)); tools[SELECT_PREVIOUS]->set_tooltip(TTR("Select the previous shape, subtile, or Tile.")); tools[SELECT_PREVIOUS]->connect("pressed", this, "_on_tool_clicked", varray(SELECT_PREVIOUS)); @@ -2932,10 +2932,14 @@ void TileSetEditor::update_workspace_tile_mode() { for (int i = 1; i < WORKSPACE_MODE_MAX; i++) { tool_workspacemode[i]->set_disabled(true); } + tools[SELECT_NEXT]->set_disabled(true); + tools[SELECT_PREVIOUS]->set_disabled(true); } else { for (int i = 1; i < WORKSPACE_MODE_MAX; i++) { tool_workspacemode[i]->set_disabled(false); } + tools[SELECT_NEXT]->set_disabled(false); + tools[SELECT_PREVIOUS]->set_disabled(false); } if (workspace_mode != WORKSPACE_EDIT) { |