Update ths column widths in BaseGrid when the number of digits in the row number changes

Originally committed to SVN as r5651.
This commit is contained in:
Thomas Goyne 2011-09-28 19:50:24 +00:00
parent b55ff3f803
commit 94998f4283
1 changed files with 6 additions and 0 deletions

View File

@ -38,6 +38,7 @@
#ifndef AGI_PRE
#include <algorithm>
#include <cmath>
#include <iterator>
#include <wx/dcclient.h>
@ -174,6 +175,8 @@ void BaseGrid::UpdateMaps(bool preserve_selected_rows) {
bind1st(std::mem_fun(&BaseGrid::GetDialogueIndex), this));
}
size_t old_diag_count = index_line_map.size();
index_line_map.clear();
line_index_map.clear();
@ -244,6 +247,9 @@ void BaseGrid::UpdateMaps(bool preserve_selected_rows) {
EndBatch();
if ((int)log10((double)old_diag_count) != (int)log10((double)index_line_map.size()))
SetColumnWidths();
Refresh(false);
}