Commit d85ab93a by Maarten L. Hekkelman

Fix swap for incomplete rows

parent a6804b5a
...@@ -1697,6 +1697,12 @@ void category::swap_item(uint16_t item_ix, row_handle &a, row_handle &b) ...@@ -1697,6 +1697,12 @@ void category::swap_item(uint16_t item_ix, row_handle &a, row_handle &b)
auto &ra = *a.m_row; auto &ra = *a.m_row;
auto &rb = *b.m_row; auto &rb = *b.m_row;
while (ra.size() <= item_ix)
ra.emplace_back("");
while (rb.size() <= item_ix)
rb.emplace_back("");
std::swap(ra.at(item_ix), rb.at(item_ix)); std::swap(ra.at(item_ix), rb.at(item_ix));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment