diff --git a/src/base_grid.cpp b/src/base_grid.cpp index 151b15be0..861b48cc5 100644 --- a/src/base_grid.cpp +++ b/src/base_grid.cpp @@ -186,6 +186,9 @@ void BaseGrid::UpdateStyle() { row_colors.SelectedComment.SetColour(to_wx(OPT_GET("Colour/Subtitle Grid/Background/Selected Comment")->GetColor())); row_colors.LeftCol.SetColour(to_wx(OPT_GET("Colour/Subtitle Grid/Left Column")->GetColor())); + if (width_helper) + width_helper->ClearCache(); + SetColumnWidths(); AdjustScrollbar(); diff --git a/src/grid_column.h b/src/grid_column.h index 16b70f2a9..fc215d0ba 100644 --- a/src/grid_column.h +++ b/src/grid_column.h @@ -41,6 +41,7 @@ class WidthHelper { public: void SetDC(wxDC *dc) { this->dc = dc; } void Age(); + void ClearCache() { widths.clear(); }; int operator()(boost::flyweight const& str); int operator()(std::string const& str);