Skip to content

Commit

Permalink
fix: item palette crashing
Browse files Browse the repository at this point in the history
  • Loading branch information
phacUFPE committed Jun 17, 2024
1 parent 77858f5 commit 8ca47ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions source/palette_brushlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,23 +101,23 @@ PaletteType BrushPalettePanel::GetType() const {
return paletteType;
}

void BrushPalettePanel::SetListType(BrushListType newTypeList) const {
void BrushPalettePanel::SetListType(BrushListType newListType) const {
if (!choicebook) {
return;
}
for (auto pageIndex = 0; pageIndex < choicebook->GetPageCount(); ++pageIndex) {
const auto &panel = dynamic_cast<BrushPanel*>(choicebook->GetPage(pageIndex));
panel->SetListType(newTypeList);
panel->SetListType(newListType);
}
}

void BrushPalettePanel::SetListType(const wxString &newTypeList) const {
void BrushPalettePanel::SetListType(const wxString &newListType) const {
if (!choicebook) {
return;
}
for (auto pageIndex = 0; pageIndex < choicebook->GetPageCount(); ++pageIndex) {
const auto &panel = dynamic_cast<BrushPanel*>(choicebook->GetPage(pageIndex));
panel->SetListType(newTypeList);
panel->SetListType(newListType);
}
}

Expand Down
2 changes: 1 addition & 1 deletion source/palette_brushlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class BrushBoxInterface {
tileset(tileset) {
ASSERT(tileset);
}
virtual ~BrushBoxInterface() { }
virtual ~BrushBoxInterface() = default;

virtual wxWindow* GetSelfWindow() = 0;

Expand Down

0 comments on commit 8ca47ed

Please sign in to comment.