Only refresh the time columns of the subtitle grid when times change

Originally committed to SVN as r4913.
This commit is contained in:
Thomas Goyne 2010-12-08 08:09:55 +00:00
parent 27cb511556
commit e1e98d0ddd
2 changed files with 10 additions and 5 deletions

View file

@ -71,9 +71,6 @@ class BaseGrid : public wxWindow, public BaseSelectionController<AssDialogue> {
/// DOCME
int lineHeight;
/// DOCME
int colWidth[16];
/// DOCME
int lastRow;
@ -112,6 +109,9 @@ class BaseGrid : public wxWindow, public BaseSelectionController<AssDialogue> {
protected:
/// DOCME
int colWidth[16];
/// DOCME
FrameMain *parentFrame;

View file

@ -127,10 +127,15 @@ 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);
}
}
/// @brief Popup menu
/// @param alternate