Added set_as_owner_drawn() for the code universality

This commit is contained in:
YuSanka 2019-05-03 16:14:26 +02:00
parent 2affa48178
commit 30dc689d35
3 changed files with 22 additions and 7 deletions

View file

@ -20,6 +20,7 @@ namespace Slic3r {
enum class ModelVolumeType : int;
};
void set_as_owner_drawn(wxMenu* menu);
const std::string& get_menuitem_icon_name(const int item_id);
void update_menu_item_icons(wxMenuItem* item);
void msw_rescale_menu(wxMenu* menu);
@ -972,10 +973,16 @@ class MenuWithSeparators : public wxMenu
{
public:
MenuWithSeparators(const wxString& title, long style = 0)
: wxMenu(title, style) {}
: wxMenu(title, style)
{
set_as_owner_drawn(this);
}
MenuWithSeparators(long style = 0)
: wxMenu(style) {}
: wxMenu(style)
{
set_as_owner_drawn(this);
}
~MenuWithSeparators() {}