From 5a49abb2eb5f237df01cb4837c0fc7500d258309 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Wed, 28 Sep 2011 19:50:41 +0000 Subject: [PATCH] Fix bug in BaseGrid::GetSelection that resulted in row 0 always being selected Originally committed to SVN as r5653. --- aegisub/src/base_grid.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aegisub/src/base_grid.cpp b/aegisub/src/base_grid.cpp index b9d4d2a14..f88298eb5 100644 --- a/aegisub/src/base_grid.cpp +++ b/aegisub/src/base_grid.cpp @@ -345,7 +345,8 @@ int BaseGrid::GetFirstSelRow() const { } wxArrayInt BaseGrid::GetSelection() const { - wxArrayInt res(selection.size()); + wxArrayInt res; + res.reserve(selection.size()); transform(selection.begin(), selection.end(), std::back_inserter(res), bind(&BaseGrid::GetDialogueIndex, this, std::tr1::placeholders::_1)); std::sort(res.begin(), res.end());