Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
stuartm committed May 23, 2012
1 parent 361834a commit 6fe9ad0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mythtv/programs/mythfrontend/videodlg.cpp
Expand Up @@ -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();
}

Expand Down Expand Up @@ -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()));
}
Expand Down

0 comments on commit 6fe9ad0

Please sign in to comment.