From aa9bd0ee1026f30d026c001aa8a7e6391a218c68 Mon Sep 17 00:00:00 2001 From: Connor Spangler Date: Tue, 24 Oct 2023 14:58:37 +0900 Subject: [PATCH] Fixed tile map scene bounding rect --- src/jide.py | 4 ++++ src/map_editor_scene.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/jide.py b/src/jide.py index 4cde83d..c295693 100644 --- a/src/jide.py +++ b/src/jide.py @@ -486,6 +486,10 @@ def populate_models(self, project_data): self.tile_pixel_palette.set_asset_name ) + self.sprite_color_palette.color_palette_name_combo.setCurrentIndex(0) + self.tile_color_palette.color_palette_name_combo.setCurrentIndex(0) + self.tile_map_picker.tile_map_name_combo.setCurrentIndex(0) + def enable_ui(self): self.tool_bar.setEnabled(True) self.editor_tabs.setEnabled(True) diff --git a/src/map_editor_scene.py b/src/map_editor_scene.py index a4dcb5b..834ab5c 100644 --- a/src/map_editor_scene.py +++ b/src/map_editor_scene.py @@ -32,6 +32,8 @@ def refresh_tile_map(self): x = 0 y += pixmap.height() + self.setSceneRect(self.itemsBoundingRect()) + @pyqtSlot(str, QColor, int) def set_color(self, color_palette, color, index): for tile in [tile for row in self.tile_map_images for tile in row]: