Skip to content

Commit

Permalink
Editor: remove 'Change Palette Group' entry from empty and location p…
Browse files Browse the repository at this point in the history
…alettes

This is a dummy entry that's supposed to be expanded to the toolkit's palette groups.
Doesn't really matter now, since the button will be hidden, but it's good to do.
  • Loading branch information
Vultraz committed May 2, 2017
1 parent e647272 commit a29f3bb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/editor/palette/empty_palette.hpp
Expand Up @@ -72,7 +72,10 @@ class empty_palette : public common_palette {
virtual const std::vector<item_group>& get_groups() const override { return empty_; }

/** Menu expanding for palette group list */
virtual void expand_palette_groups_menu(std::vector< config> & /*items*/,int) override {}
virtual void expand_palette_groups_menu(std::vector<config>& items, int i) override
{
items.erase(items.begin() + i);
}

//item
virtual int num_items() override {return 0;}
Expand Down
5 changes: 4 additions & 1 deletion src/editor/palette/location_palette.hpp
Expand Up @@ -42,7 +42,10 @@ class location_palette : public common_palette {
size_t start_num(void) override { return items_start_; }

/** Menu expanding for palette group list */
void expand_palette_groups_menu(std::vector<config>&,int) override {}
void expand_palette_groups_menu(std::vector<config>& items, int i) override
{
items.erase(items.begin() + i);
}

virtual void set_group(size_t /*index*/) override {}
virtual void next_group() override {}
Expand Down

0 comments on commit a29f3bb

Please sign in to comment.