Skip to content

Commit

Permalink
Fixed tile map scene bounding rect
Browse files Browse the repository at this point in the history
  • Loading branch information
cspang1 committed Oct 24, 2023
1 parent 2537af8 commit aa9bd0e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/jide.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions src/map_editor_scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down

0 comments on commit aa9bd0e

Please sign in to comment.