Skip to content

Commit

Permalink
Fix "Clear Override" to not create invalid rules.
Browse files Browse the repository at this point in the history
Fix RecordingInfo::ApplyRecordStateChange() to delete the underlying
rule instead of saving it when the new type is kNotRecording.
Previously, this would result in an invalid rule with type 0.
  • Loading branch information
gigem committed Jan 23, 2012
1 parent 20adee5 commit 6c2276f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mythtv/libs/libmythtv/recordinginfo.cpp
Expand Up @@ -531,7 +531,12 @@ void RecordingInfo::ApplyRecordStateChange(RecordingType newstate, bool save)
record->m_type = newstate;

if (save)
record->Save();
{
if (newstate == kNotRecording)
record->Delete();
else
record->Save();
}
}

/** \fn RecordingInfo::ApplyRecordRecPriorityChange(int)
Expand Down

0 comments on commit 6c2276f

Please sign in to comment.