Skip to content

Commit

Permalink
GUI2/Menu Button: removed unused member
Browse files Browse the repository at this point in the history
Probably became unused once certain toggle functionality was split off into the multimenu button
  • Loading branch information
Vultraz committed Sep 9, 2017
1 parent acea15c commit 2280f7b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
7 changes: 0 additions & 7 deletions src/gui/widgets/menu_button.cpp
Expand Up @@ -45,7 +45,6 @@ menu_button::menu_button(const implementation::builder_menu_button& builder)
, values_()
, selected_()
, keep_open_(false)
, droplist_(nullptr)
{
values_.emplace_back(::config {"label", this->get_label()});

Expand Down Expand Up @@ -135,11 +134,7 @@ void menu_button::signal_handler_left_button_click(const event::ui_event event,
dialogs::drop_down_menu droplist(this->get_rectangle(), this->values_, this->selected_, this->get_use_markup(), this->keep_open_,
nullptr);

droplist_ = &droplist;

if(droplist.show(get_window()->video())) {
droplist_ = nullptr;

const int selected = droplist.selected_item();

// Safety check. If the user clicks a selection in the dropdown and moves their mouse away too
Expand All @@ -158,8 +153,6 @@ void menu_button::signal_handler_left_button_click(const event::ui_event event,
}
}

droplist_ = nullptr;

handled = true;
}

Expand Down
2 changes: 0 additions & 2 deletions src/gui/widgets/menu_button.hpp
Expand Up @@ -134,8 +134,6 @@ class menu_button : public styled_widget, public selectable_item

bool keep_open_;

dialogs::drop_down_menu* droplist_;

/** Inherited from styled_widget, implemented by REGISTER_WIDGET. */
virtual const std::string& get_control_type() const override;

Expand Down

0 comments on commit 2280f7b

Please sign in to comment.