diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-02 20:18:25 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-02 20:18:25 +0000 |
commit | 60555ecedc9a4e66eb46fba6bbc0f185a8c2a1cb (patch) | |
tree | 5d88b6afcbfa83a5ed6068633d62c55eeb0dcd9e /chrome | |
parent | d04fce5ea9080ed4a3979f555affd4e45f6ce71d (diff) | |
download | chromium_src-60555ecedc9a4e66eb46fba6bbc0f185a8c2a1cb.zip chromium_src-60555ecedc9a4e66eb46fba6bbc0f185a8c2a1cb.tar.gz chromium_src-60555ecedc9a4e66eb46fba6bbc0f185a8c2a1cb.tar.bz2 |
Fixes bug where clicks any where around the cut/copy/paste menu would
result in a cut, or similarly any where around the zoom buttons would
result in zooming.
BUG=47933
TEST=see bug
Review URL: http://codereview.chromium.org/2872029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51558 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/views/wrench_menu.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/chrome/browser/views/wrench_menu.cc b/chrome/browser/views/wrench_menu.cc index 2ba3a5a..457d6e9 100644 --- a/chrome/browser/views/wrench_menu.cc +++ b/chrome/browser/views/wrench_menu.cc @@ -542,12 +542,21 @@ bool WrenchMenu::IsCommandEnabled(int id) const { // The items representing the cut (cut/copy/paste) and zoom menu // (increment/decrement/reset) are always enabled. The child views of these // items enabled state updates appropriately. - return command_id == IDC_CUT || command_id == IDC_ZOOM_MENU || + return command_id == IDC_CUT || command_id == IDC_ZOOM_PLUS || entry.first->IsEnabledAt(entry.second); } void WrenchMenu::ExecuteCommand(int id) { const Entry& entry = id_to_entry_.find(id)->second; + int command_id = entry.first->GetCommandIdAt(entry.second); + + if (command_id == IDC_CUT || command_id == IDC_ZOOM_PLUS) { + // These items are represented by child views. If ExecuteCommand is invoked + // it means the user clicked on the area around the buttons and we should + // not do anyting. + return; + } + return entry.first->ActivatedAt(entry.second); } |