summaryrefslogtreecommitdiffstats
path: root/win/CS
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-03-23 21:29:03 +0000
committersr55 <[email protected]>2012-03-23 21:29:03 +0000
commite3a97d65b55111d6c140a74794a587c791598248 (patch)
tree37762c7034e35b779b6e22569dcd11121faa96cc /win/CS
parentf5535905f9ff45c8c25389db9db42049407f8ad8 (diff)
WinGui: (trunk) Fix Default preset option not working for custom presets.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4529 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS')
-rw-r--r--win/CS/frmMain.cs11
1 files changed, 10 insertions, 1 deletions
diff --git a/win/CS/frmMain.cs b/win/CS/frmMain.cs
index 697932940..2d022bedb 100644
--- a/win/CS/frmMain.cs
+++ b/win/CS/frmMain.cs
@@ -622,7 +622,7 @@ namespace Handbrake
Form preset = new frmAddPreset(this, presetHandler);
if (preset.ShowDialog() == DialogResult.OK)
{
- TreeNode presetTreeview = new TreeNode(presetHandler.LastPresetAdded.Name) { ForeColor = Color.Black };
+ TreeNode presetTreeview = new TreeNode(presetHandler.LastPresetAdded.Name) { ForeColor = Color.Black, Tag = presetHandler.LastPresetAdded };
treeView_presets.Nodes.Add(presetTreeview);
presetHandler.LastPresetAdded = null;
}
@@ -826,10 +826,19 @@ namespace Handbrake
{
foreach (TreeNode treenode in treeView_presets.Nodes)
{
+ if (treenode.Tag != null && ((Preset)treenode.Tag).Name == presetName)
+ {
+ treeView_presets.SelectedNode = treenode;
+ return;
+ }
+
foreach (TreeNode node in treenode.Nodes)
{
if (node.Text.Equals(presetName))
+ {
treeView_presets.SelectedNode = node;
+ return;
+ }
}
}
}