From e085883e1cc20f0a7f467bac97f157fd0ba091c0 Mon Sep 17 00:00:00 2001 From: "feal87@gmail.com" Date: Wed, 22 Dec 2010 07:07:35 +0000 Subject: [PATCH] Forgot a little fix. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4120 96395faa-99c1-11dd-bbfe-3dabce05a288 --- tools/GSDumpGUI/Core/Program.cs | 9 +++++++++ tools/GSDumpGUI/Forms/frmMain.cs | 11 +++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/tools/GSDumpGUI/Core/Program.cs b/tools/GSDumpGUI/Core/Program.cs index b8ec038240..11884c65e3 100644 --- a/tools/GSDumpGUI/Core/Program.cs +++ b/tools/GSDumpGUI/Core/Program.cs @@ -299,6 +299,15 @@ namespace GSDumpGUI { frmMain.lstProcesses.Items.Add(itm.IPAddress); } + if (frmMain.lstProcesses.SelectedIndex == -1) + { + frmMain.chkDebugMode.Checked = false; + frmMain.lblGif.Enabled = frmMain.chkDebugMode.Checked; + frmMain.btnRunToSelection.Enabled = frmMain.chkDebugMode.Checked; + frmMain.treTreeView.Enabled = frmMain.chkDebugMode.Checked; + frmMain.btnStep.Enabled = frmMain.chkDebugMode.Checked; + frmMain.treTreeView.Nodes.Clear(); + } }), new object[] { null}); } } diff --git a/tools/GSDumpGUI/Forms/frmMain.cs b/tools/GSDumpGUI/Forms/frmMain.cs index 6a26822aca..66ebc8d0c3 100644 --- a/tools/GSDumpGUI/Forms/frmMain.cs +++ b/tools/GSDumpGUI/Forms/frmMain.cs @@ -399,10 +399,13 @@ namespace GSDumpGUI private void chkDebugMode_CheckedChanged(object sender, EventArgs e) { - TCPMessage msg = new TCPMessage(); - msg.MessageType = MessageType.SetDebugMode; - msg.Parameters.Add(chkDebugMode.Checked); - Program.Clients.Find(a => a.IPAddress == lstProcesses.SelectedItem.ToString()).Send(msg); + if (lstProcesses.SelectedIndex != -1) + { + TCPMessage msg = new TCPMessage(); + msg.MessageType = MessageType.SetDebugMode; + msg.Parameters.Add(chkDebugMode.Checked); + Program.Clients.Find(a => a.IPAddress == lstProcesses.SelectedItem.ToString()).Send(msg); + } } private void btnStep_Click(object sender, EventArgs e)