From 1664faf159eac19f0145ff18a9dcfcaf96a9e0c3 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Sun, 16 Jan 2011 07:16:21 +0000 Subject: [PATCH] Make SubtitlesGrid listen for changes to "Subtitle/Grid/Hide Overrides" rather than refreshing it from the command Originally committed to SVN as r5204. --- aegisub/src/command/grid.cpp | 6 ------ aegisub/src/subs_grid.cpp | 1 + 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/aegisub/src/command/grid.cpp b/aegisub/src/command/grid.cpp index a3dc07fee..82a1c4caf 100644 --- a/aegisub/src/command/grid.cpp +++ b/aegisub/src/command/grid.cpp @@ -102,9 +102,6 @@ struct grid_tag_cycle_hiding : public Command { // Set option OPT_SET("Subtitle/Grid/Hide Overrides")->SetInt(tagMode); - - // Refresh grid - c->SubsGrid->Refresh(false); } }; @@ -118,7 +115,6 @@ struct grid_tags_hide : public Command { void operator()(agi::Context *c) { OPT_SET("Subtitle/Grid/Hide Overrides")->SetInt(2); - c->SubsGrid->Refresh(false); } }; @@ -132,7 +128,6 @@ struct grid_tags_show : public Command { void operator()(agi::Context *c) { OPT_SET("Subtitle/Grid/Hide Overrides")->SetInt(0); - c->SubsGrid->Refresh(false); } }; @@ -146,7 +141,6 @@ struct grid_tags_simplify : public Command { void operator()(agi::Context *c) { OPT_SET("Subtitle/Grid/Hide Overrides")->SetInt(1); - c->SubsGrid->Refresh(false); } }; diff --git a/aegisub/src/subs_grid.cpp b/aegisub/src/subs_grid.cpp index b0355637d..5a4ab654e 100644 --- a/aegisub/src/subs_grid.cpp +++ b/aegisub/src/subs_grid.cpp @@ -114,6 +114,7 @@ SubtitlesGrid::SubtitlesGrid(FrameMain* parentFr, wxWindow *parent, wxWindowID i OnHighlightVisibleChange(*OPT_GET("Subtitle/Grid/Highlight Subtitles in Frame")); OPT_SUB("Subtitle/Grid/Highlight Subtitles in Frame", &SubtitlesGrid::OnHighlightVisibleChange, this); + OPT_SUB("Subtitle/Grid/Hide Overrides", std::tr1::bind(&SubtitlesGrid::Refresh, this, false, (const wxRect*)0)); ass->AddCommitListener(&SubtitlesGrid::OnCommit, this); }