mirror of
https://github.com/huderlem/porymap.git
synced 2026-10-01 12:26:37 -05:00
define a setMap for current_metatile_selection_item to prevent crash on project transition
This commit is contained in:
@@ -15,6 +15,8 @@ public:
|
|||||||
Map* map = nullptr;
|
Map* map = nullptr;
|
||||||
MetatileSelector *metatileSelector;
|
MetatileSelector *metatileSelector;
|
||||||
void draw();
|
void draw();
|
||||||
|
|
||||||
|
void setMap(Map *map) { this->map = map; }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CURRENTSELECTEDMETATILESPIXMAPITEM_H
|
#endif // CURRENTSELECTEDMETATILESPIXMAPITEM_H
|
||||||
|
|||||||
@@ -1299,6 +1299,7 @@ void Editor::displayCurrentMetatilesSelection() {
|
|||||||
|
|
||||||
void Editor::redrawCurrentMetatilesSelection() {
|
void Editor::redrawCurrentMetatilesSelection() {
|
||||||
if (current_metatile_selection_item) {
|
if (current_metatile_selection_item) {
|
||||||
|
current_metatile_selection_item->setMap(map);
|
||||||
current_metatile_selection_item->draw();
|
current_metatile_selection_item->draw();
|
||||||
emit currentMetatilesSelectionChanged();
|
emit currentMetatilesSelectionChanged();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user