Permalink
Browse files

Ensure the default parental level is set before we Load() the video d…

…ata. This was seemingly always backwards which caused the data to be loaded twice. It was then broken by 7c8e45f which moved the signal connection to the right place but overlooked the misplaced ParentalLevel::SetLevel(). To recap, we want to connect the SigLevelChanged() signal _after_ the initial load otherwise we'd always trigger a second unwanted load.
  • Loading branch information...
1 parent 361834a commit 6fe9ad066571d2d83600191182123b5dc41152e4 @stuartm stuartm committed May 20, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 mythtv/programs/mythfrontend/videodlg.cpp
@@ -852,6 +852,10 @@ VideoDialog::VideoDialog(MythScreenStack *lparent, QString lname,
m_d->m_videoList->setCurrentVideoFilter(VideoFilterSettings(true,
lname));
+ m_d->m_parentalLevel.SetLevel(ParentalLevel(gCoreContext->
+ GetNumSetting("VideoDefaultParentalLevel",
+ ParentalLevel::plLowest)));
+
StorageGroup::ClearGroupToUseCache();
}
@@ -1032,9 +1036,6 @@ bool VideoDialog::Create()
void VideoDialog::Init()
{
- m_d->m_parentalLevel.SetLevel(ParentalLevel(gCoreContext->
- GetNumSetting("VideoDefaultParentalLevel",
- ParentalLevel::plLowest)));
connect(&m_d->m_parentalLevel, SIGNAL(SigLevelChanged()),
SLOT(reloadData()));
}

0 comments on commit 6fe9ad0

Please sign in to comment.