Kill VideoContext::Refresh's arguments; one has never actually done anything and the other is the same in all places where Refresh is called.

Originally committed to SVN as r4528.
This commit is contained in:
Thomas Goyne 2010-06-16 06:20:39 +00:00
parent faf2e562cd
commit d6b68dfb25
3 changed files with 5 additions and 12 deletions

View file

@ -1456,7 +1456,7 @@ void SubtitlesGrid::CommitChanges(bool force,bool videoOnly) {
} }
// Update video // Update video
if (VideoContext::Get()->IsLoaded()) VideoContext::Get()->Refresh(false,true); if (VideoContext::Get()->IsLoaded()) VideoContext::Get()->Refresh();
// Resume play // Resume play
if (playing) VideoContext::Get()->Play(); if (playing) VideoContext::Get()->Play();

View file

@ -340,13 +340,8 @@ void VideoContext::UpdateDisplays(bool full) {
} }
/// @brief Refresh subtitles /// @brief Refresh subtitles
/// @param video void VideoContext::Refresh () {
/// @param subtitles if (subsProvider) {
///
void VideoContext::Refresh (bool video, bool subtitles) {
// Update subtitles
if (subtitles && subsProvider) {
// Re-export
AssExporter exporter(grid->ass); AssExporter exporter(grid->ass);
exporter.AddAutoFilters(); exporter.AddAutoFilters();
try { try {
@ -356,9 +351,7 @@ void VideoContext::Refresh (bool video, bool subtitles) {
catch (wxString err) { wxMessageBox(_T("Error while invoking subtitles provider: ") + err,_T("Subtitles provider")); } catch (wxString err) { wxMessageBox(_T("Error while invoking subtitles provider: ") + err,_T("Subtitles provider")); }
catch (const wchar_t *err) { wxMessageBox(_T("Error while invoking subtitles provider: ") + wxString(err),_T("Subtitles provider")); } catch (const wchar_t *err) { wxMessageBox(_T("Error while invoking subtitles provider: ") + wxString(err),_T("Subtitles provider")); }
} }
UpdateDisplays(false);
// Jump to frame
JumpToFrame(frame_n);
} }
/// @brief Jumps to a frame and update display /// @brief Jumps to a frame and update display

View file

@ -266,7 +266,7 @@ public:
void JumpToFrame(int n); void JumpToFrame(int n);
void JumpToTime(int ms,bool exact=false); void JumpToTime(int ms,bool exact=false);
void Refresh(bool video,bool subtitles); void Refresh();
void UpdateDisplays(bool full); void UpdateDisplays(bool full);
void GetScriptSize(int &w,int &h); void GetScriptSize(int &w,int &h);