Index: chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc |
=================================================================== |
--- chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc (revision 147038) |
+++ chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc (working copy) |
@@ -1279,13 +1279,17 @@ |
return; |
std::vector<TabGtk*> tabs; |
+ TabGtk* selected_tab; |
sky
2012/07/18 04:09:11
selected_tab is only needed in the loop, move it t
Cris Neckar
2012/07/18 19:35:14
Done.
|
for (size_t i = 0; i < model()->selection_model().size(); i++) { |
- TabGtk* tab = GetTabAt(model()->selection_model().selected_indices()[i]); |
- if (!tab->closing()) |
- tabs.push_back(tab); |
+ selected_tab = GetTabAt(model()->selection_model().selected_indices()[i]); |
+ if (!selected_tab->closing()) |
+ tabs.push_back(selected_tab); |
} |
+ // If the tab is closing it will not have been added to the vector. |
+ if (selected_tab->closing()) |
sky
2012/07/18 04:09:11
This should be remove (it's handled by 1278.
Cris Neckar
2012/07/18 19:35:14
Done.
|
+ return; |
- drag_controller_.reset(new DraggedTabControllerGtk(this, tab, tabs)); |
+ drag_controller_.reset(new DraggedTabControllerGtk(this, selected_tab, tabs)); |
sky
2012/07/18 04:09:11
This should use tab.
Cris Neckar
2012/07/18 19:35:14
Done.
|
drag_controller_->CaptureDragInfo(point); |
} |