From e1e98d0dddcf83ce9189fa2f53bdea9304031801 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Wed, 8 Dec 2010 08:09:55 +0000 Subject: [PATCH] Only refresh the time columns of the subtitle grid when times change Originally committed to SVN as r4913. --- aegisub/src/base_grid.h | 6 +++--- aegisub/src/subs_grid.cpp | 9 +++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/aegisub/src/base_grid.h b/aegisub/src/base_grid.h index 2bde01568..c323a03fe 100644 --- a/aegisub/src/base_grid.h +++ b/aegisub/src/base_grid.h @@ -71,9 +71,6 @@ class BaseGrid : public wxWindow, public BaseSelectionController { /// DOCME int lineHeight; - /// DOCME - int colWidth[16]; - /// DOCME int lastRow; @@ -112,6 +109,9 @@ class BaseGrid : public wxWindow, public BaseSelectionController { protected: + /// DOCME + int colWidth[16]; + /// DOCME FrameMain *parentFrame; diff --git a/aegisub/src/subs_grid.cpp b/aegisub/src/subs_grid.cpp index ab78e77ec..c31daf417 100644 --- a/aegisub/src/subs_grid.cpp +++ b/aegisub/src/subs_grid.cpp @@ -127,9 +127,14 @@ void SubtitlesGrid::OnCommit(int type) { else if (type == AssFile::COMMIT_UNDO) UpdateMaps(true); - if (type != AssFile::COMMIT_TIMES) + if (type == AssFile::COMMIT_TIMES) { + // Refresh just the audio times columns + RefreshRect(wxRect(colWidth[0] + colWidth[1], 0, colWidth[2] + colWidth[3], GetClientSize().GetHeight()), false); + } + else { SetColumnWidths(); - Refresh(false); + Refresh(false); + } } /// @brief Popup menu