Fixes for pull request #101

This commit is contained in:
valeriog
2014-10-28 20:27:33 +01:00
parent 71b10310cd
commit 91871a7a18
3 changed files with 22 additions and 2 deletions
+11 -2
View File
@@ -287,9 +287,9 @@ namespace renderdocui.Windows.Dialogs
{
if (result == "exception")
{
System.Diagnostics.Trace.WriteLine("On line " + frame.f_lineno.ToString());
linenum = (int)frame.f_lineno - 1;
System.Diagnostics.Trace.WriteLine("On line " + frame.f_lineno.ToString());
}
linenum = (int)frame.f_lineno - 1;
stdoutwriter.Flush();
stdout.Seek(0, SeekOrigin.Begin);
@@ -339,6 +339,9 @@ namespace renderdocui.Windows.Dialogs
EnableButtons(false);
linenumTimer.Enabled = true;
linenumTimer.Start();
Thread th = Helpers.NewThread(new ThreadStart(() =>
{
pythonengine.SetTrace(PythonTrace);
@@ -346,6 +349,7 @@ namespace renderdocui.Windows.Dialogs
// ignore output, the trace handler above will print output
string output = Execute(pythonengine, scriptscope, script);
linenumTimer.Stop();
pythonengine.SetTrace(null);
this.BeginInvoke(new Action(() =>
@@ -439,5 +443,10 @@ namespace renderdocui.Windows.Dialogs
scriptEditor.Text = scriptEditor.Text.Replace("\n", Environment.NewLine);
}
private void linenumTimer_Tick(object sender, EventArgs e)
{
SetLineNumber(linenum);
}
}
}