diff options
Diffstat (limited to 'ui/views/controls/combobox/native_combobox_views.cc')
-rw-r--r-- | ui/views/controls/combobox/native_combobox_views.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/ui/views/controls/combobox/native_combobox_views.cc b/ui/views/controls/combobox/native_combobox_views.cc index 7a0d873..8ef1efa 100644 --- a/ui/views/controls/combobox/native_combobox_views.cc +++ b/ui/views/controls/combobox/native_combobox_views.cc @@ -19,7 +19,6 @@ #include "ui/views/background.h" #include "ui/views/border.h" #include "ui/views/color_constants.h" -#include "ui/views/controls/button/menu_button.h" #include "ui/views/controls/combobox/combobox.h" #include "ui/views/controls/focusable_border.h" #include "ui/views/controls/menu/menu_runner.h" @@ -98,9 +97,7 @@ NativeComboboxViews::~NativeComboboxViews() { bool NativeComboboxViews::OnMousePressed(const ui::MouseEvent& mouse_event) { combobox_->RequestFocus(); - const base::TimeDelta delta = base::Time::Now() - closed_time_; - if (mouse_event.IsLeftMouseButton() && - (delta.InMilliseconds() > MenuButton::kMinimumTimeBetweenButtonClicks)) { + if (mouse_event.IsLeftMouseButton()) { UpdateFromModel(); ShowDropDownMenu(ui::MENU_SOURCE_MOUSE); } @@ -372,6 +369,7 @@ void NativeComboboxViews::PaintText(gfx::Canvas* canvas) { } void NativeComboboxViews::ShowDropDownMenu(ui::MenuSourceType source_type) { + if (!dropdown_list_menu_runner_.get()) UpdateFromModel(); @@ -403,7 +401,6 @@ void NativeComboboxViews::ShowDropDownMenu(ui::MenuSourceType source_type) { MenuRunner::MENU_DELETED) return; dropdown_open_ = false; - closed_time_ = base::Time::Now(); // Need to explicitly clear mouse handler so that events get sent // properly after the menu finishes running. If we don't do this, then |