Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4628)

Unified Diff: chrome/browser/tabs/tab_strip_selection_model.cc

Issue 7140001: Multi-tab: Fixing TabStripSelectionModel::SetSelectedIndex corner case. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding unit tests Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/tabs/tab_strip_selection_model.cc
diff --git a/chrome/browser/tabs/tab_strip_selection_model.cc b/chrome/browser/tabs/tab_strip_selection_model.cc
index 1164b28f7cb006a32e609df8ac394f84a3f3e687..43757c3ccd029fda240479438ca3dc7250c5ae49 100644
--- a/chrome/browser/tabs/tab_strip_selection_model.cc
+++ b/chrome/browser/tabs/tab_strip_selection_model.cc
@@ -59,7 +59,9 @@ void TabStripSelectionModel::DecrementFrom(int index) {
void TabStripSelectionModel::SetSelectedIndex(int index) {
anchor_ = active_ = index;
- SetSelectionFromAnchorTo(index);
+ selected_indices_.clear();
+ if (index != kUnselectedIndex)
+ selected_indices_.push_back(index);
}
bool TabStripSelectionModel::IsSelected(int index) const {

Powered by Google App Engine
This is Rietveld 408576698