Permalink
Browse files

Merge remote-tracking branch 'remotes/origin/BUG-4278-Add_a_string_to…

…_store_default_DRR_value_by_name_also'
  • Loading branch information...
2 parents 4b7a90c + 3393e8f commit fc3a7c930febed71aec52c1230248249950b0667 @Sebastiii Sebastiii committed Mar 30, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 mediaportal/Configuration/Sections/GeneralDynamicRefreshRate.cs
@@ -52,6 +52,7 @@ public class GeneralDynamicRefreshRate : SectionSettings
private DataGridViewTextBoxColumn gridColRR;
private DataGridViewTextBoxColumn gridColAction;
private string sDefaultHz;
+ private string sDefaultHzName;
public GeneralDynamicRefreshRate()
: this("Dynamic Refresh Rate") {}
@@ -95,6 +96,7 @@ public override void LoadSettings()
chkUseDeviceReset.Checked = xmlreader.GetValueAsBool("general", "devicereset", false);
chkForceRR.Checked = xmlreader.GetValueAsBool("general", "force_refresh_rate", false);
sDefaultHz = xmlreader.GetValueAsString("general", "default_hz", "");
+ sDefaultHzName = xmlreader.GetValueAsString("general", "default_hz_name", "");
String[] p = null;
DataGridViewRow row = new DataGridViewRow();
/*
@@ -128,7 +130,7 @@ public override void LoadSettings()
dataGridViewRR.Rows.Add((object[])p);
row = dataGridViewRR.Rows[dataGridViewRR.Rows.Count - 1];
defaultHz.Items.Add(p[0]);
- if (sDefaultHz == hz)
+ if (sDefaultHz == hz && sDefaultHzName == name)
defaultHz.SelectedItem = name;
if (name.ToLower().IndexOf("tv") > -1)
@@ -155,6 +157,7 @@ public override void SaveSettings()
xmlwriter.SetValueAsBool("general", "devicereset", chkUseDeviceReset.Checked);
xmlwriter.SetValueAsBool("general", "force_refresh_rate", chkForceRR.Checked);
xmlwriter.SetValue("general", "default_hz", sDefaultHz);
+ xmlwriter.SetValue("general", "default_hz_name", sDefaultHzName);
/*
// example
@@ -666,6 +669,7 @@ private void defaultHz_SelectedIndexChanged(object sender, EventArgs e)
if (name == defaultHz.SelectedItem.ToString())
{
sDefaultHz = hz;
+ sDefaultHzName = name;
break;
}
}

0 comments on commit fc3a7c9

Please sign in to comment.