Skip to content

Commit

Permalink
Merge pull request #83244 from KoBeWi/tile_map_is_now_tile_set_and_vi…
Browse files Browse the repository at this point in the history
…ce_versa

Swap TileMap and TileSet buttons
  • Loading branch information
akien-mga committed Oct 13, 2023
2 parents 577fbd8 + 291be2c commit 37ee293
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions editor/plugins/tiles/tiles_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,9 @@ bool TileMapEditorPlugin::is_editor_visible() const {
}

TileMapEditorPlugin::TileMapEditorPlugin() {
memnew(TilesEditorUtils);
if (!TilesEditorUtils::get_singleton()) {
memnew(TilesEditorUtils);
}
tile_map_plugin_singleton = this;

editor = memnew(TileMapEditor);
Expand Down Expand Up @@ -462,7 +464,9 @@ ObjectID TileSetEditorPlugin::get_edited_tileset() const {
}

TileSetEditorPlugin::TileSetEditorPlugin() {
DEV_ASSERT(tile_map_plugin_singleton);
if (!TilesEditorUtils::get_singleton()) {
memnew(TilesEditorUtils);
}
tile_set_plugin_singleton = this;

editor = memnew(TileSetEditor);
Expand Down
2 changes: 1 addition & 1 deletion editor/register_editor_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ void register_editor_types() {
EditorPlugins::add_by_type<Cast2DEditorPlugin>();
EditorPlugins::add_by_type<Skeleton2DEditorPlugin>();
EditorPlugins::add_by_type<Sprite2DEditorPlugin>();
EditorPlugins::add_by_type<TileMapEditorPlugin>();
EditorPlugins::add_by_type<TileSetEditorPlugin>();
EditorPlugins::add_by_type<TileMapEditorPlugin>();

// For correct doc generation.
GLOBAL_DEF("editor/run/main_run_args", "");
Expand Down

0 comments on commit 37ee293

Please sign in to comment.