diff options
author | sky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-12 00:05:35 +0000 |
---|---|---|
committer | sky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-12 00:05:35 +0000 |
commit | 127cc6babf419c6dbd6204fb2cdd969c1777befa (patch) | |
tree | 188ab44575f92f01cffbe65e93ae648cd89745f2 /chrome/browser/views/bookmark_table_view.cc | |
parent | dccf5db1c627eb53f5dba004ab4e8628323a94b0 (diff) | |
download | chromium_src-127cc6babf419c6dbd6204fb2cdd969c1777befa.zip chromium_src-127cc6babf419c6dbd6204fb2cdd969c1777befa.tar.gz chromium_src-127cc6babf419c6dbd6204fb2cdd969c1777befa.tar.bz2 |
Changes TableView to have its own mouse handling code so that we can
start a drag when user clicks anywhere on a row.
BUG=4306
TEST=thoroughly test drag and drop of bookmark manager table.
Review URL: http://codereview.chromium.org/9776
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5233 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/bookmark_table_view.cc')
-rw-r--r-- | chrome/browser/views/bookmark_table_view.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/views/bookmark_table_view.cc b/chrome/browser/views/bookmark_table_view.cc index 9433976..33d92df 100644 --- a/chrome/browser/views/bookmark_table_view.cc +++ b/chrome/browser/views/bookmark_table_view.cc @@ -182,6 +182,10 @@ void BookmarkTableView::BeginDrag() { if (nodes_to_drag.empty()) return; // Nothing to drag. + // Reverse the nodes so that they are put on the clipboard in visual order. + // We do this as SelectionBegin starts at the end of the visual order. + std::reverse(nodes_to_drag.begin(), nodes_to_drag.end()); + scoped_refptr<OSExchangeData> data = new OSExchangeData; BookmarkDragData(nodes_to_drag).Write(profile_, data); scoped_refptr<BaseDragSource> drag_source(new BaseDragSource); |