diff options
author | ian@chromium.org <ian@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-10 18:44:48 +0000 |
---|---|---|
committer | ian@chromium.org <ian@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-10 18:44:48 +0000 |
commit | 0457c6bb559c2cebf47235388f0441be51817d60 (patch) | |
tree | c0cabb4c18a45d1f5d48df8bb19e6442ad95b357 /views/controls/tree | |
parent | e06131db8c610bca50a025fc876755d0aa42e53c (diff) | |
download | chromium_src-0457c6bb559c2cebf47235388f0441be51817d60.zip chromium_src-0457c6bb559c2cebf47235388f0441be51817d60.tar.gz chromium_src-0457c6bb559c2cebf47235388f0441be51817d60.tar.bz2 |
Fixes a bug where if there are only localstorage nodes, but nocookies nodes, the Remove and Remove All buttons are disabled.BUG=34886
TEST=clear all cookies, go to www.ianfette.com/localstorage.html and open cookies dialog, check that remove button is enabled.
Review URL: http://codereview.chromium.org/596002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38640 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/tree')
-rw-r--r-- | views/controls/tree/tree_view.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/views/controls/tree/tree_view.cc b/views/controls/tree/tree_view.cc index 4b87cde..68bd822 100644 --- a/views/controls/tree/tree_view.cc +++ b/views/controls/tree/tree_view.cc @@ -45,7 +45,7 @@ TreeView::TreeView() TreeView::~TreeView() { if (model_) - model_->SetObserver(NULL); + model_->RemoveObserver(this); // Both param_to_details_map_ and node_to_details_map_ have the same value, // as such only need to delete from one. STLDeleteContainerPairSecondPointers(id_to_details_map_.begin(), @@ -60,11 +60,11 @@ void TreeView::SetModel(TreeModel* model) { if (model_ && tree_view_) DeleteRootItems(); if (model_) - model_->SetObserver(NULL); + model_->RemoveObserver(this); model_ = model; if (tree_view_ && model_) { CreateRootItems(); - model_->SetObserver(this); + model_->AddObserver(this); HIMAGELIST last_image_list = image_list_; image_list_ = CreateImageList(); TreeView_SetImageList(tree_view_, image_list_, TVSIL_NORMAL); @@ -370,7 +370,7 @@ HWND TreeView::CreateNativeControl(HWND parent_container) { if (model_) { CreateRootItems(); - model_->SetObserver(this); + model_->AddObserver(this); image_list_ = CreateImageList(); TreeView_SetImageList(tree_view_, image_list_, TVSIL_NORMAL); } |