forked from mia/Aegisub
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:
parent
b55ff3f803
commit
94998f4283
1 changed files with 6 additions and 0 deletions
|
@ -38,6 +38,7 @@
|
||||||
|
|
||||||
#ifndef AGI_PRE
|
#ifndef AGI_PRE
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <cmath>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
#include <wx/dcclient.h>
|
#include <wx/dcclient.h>
|
||||||
|
@ -174,6 +175,8 @@ void BaseGrid::UpdateMaps(bool preserve_selected_rows) {
|
||||||
bind1st(std::mem_fun(&BaseGrid::GetDialogueIndex), this));
|
bind1st(std::mem_fun(&BaseGrid::GetDialogueIndex), this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t old_diag_count = index_line_map.size();
|
||||||
|
|
||||||
index_line_map.clear();
|
index_line_map.clear();
|
||||||
line_index_map.clear();
|
line_index_map.clear();
|
||||||
|
|
||||||
|
@ -244,6 +247,9 @@ void BaseGrid::UpdateMaps(bool preserve_selected_rows) {
|
||||||
|
|
||||||
EndBatch();
|
EndBatch();
|
||||||
|
|
||||||
|
if ((int)log10((double)old_diag_count) != (int)log10((double)index_line_map.size()))
|
||||||
|
SetColumnWidths();
|
||||||
|
|
||||||
Refresh(false);
|
Refresh(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue