Skip to content

Commit

Permalink
Attempt to fixup 601c10c
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Jan 20, 2021
1 parent 42fa1aa commit 6391969
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/editor/palette/location_palette.cpp
Expand Up @@ -50,7 +50,7 @@ class location_palette_item : public gui::widget
}

};
location_palette_item(CVideo& video, editor::location_palette& parent)
location_palette_item(CVideo& video, editor::location_palette* parent)
: gui::widget(video, true)
, parent_(parent)
{
Expand Down Expand Up @@ -78,7 +78,7 @@ class location_palette_item : public gui::widget
if (!(hit(e.x, e.y)))
return;
if (e.button == SDL_BUTTON_LEFT) {
parent_.select_item(id_);
parent_->select_item(id_);
}
if (e.button == SDL_BUTTON_RIGHT) {
//TODO: add a context menu with the following options:
Expand Down Expand Up @@ -131,7 +131,7 @@ class location_palette_item : public gui::widget
std::string id_;
std::string desc_;
state_t state_;
editor::location_palette& parent_;
editor::location_palette* parent_;
};

class location_palette_button : public gui::button
Expand Down Expand Up @@ -291,7 +291,7 @@ void location_palette::adjust_size(const SDL_Rect& target)
// If that happens, no items will fit and we'll have a negative number here.
// Just skip it in that case.
if(items_fitting > 0 && num_visible_items() != items_fitting) {
location_palette_item lpi(disp_.video(), *this);
location_palette_item lpi(disp_.video(), this);
buttons_.resize(items_fitting, lpi);
}

Expand Down

0 comments on commit 6391969

Please sign in to comment.