mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
When we hit an exception, pass the line number of the top-of-stack
* This allows us to update the current line highlight before stopping.
This commit is contained in:
@@ -569,7 +569,8 @@ void PythonShell::traceLine(const QString &file, int line)
|
||||
scriptEditor->markerAdd(line > 0 ? line - 1 : 0, CURRENT_MARKER + 1);
|
||||
}
|
||||
|
||||
void PythonShell::exception(const QString &type, const QString &value, QList<QString> frames)
|
||||
void PythonShell::exception(const QString &type, const QString &value, int finalLine,
|
||||
QList<QString> frames)
|
||||
{
|
||||
QTextEdit *out = ui->scriptOutput;
|
||||
if(QObject::sender() == (QObject *)interactiveContext)
|
||||
@@ -577,6 +578,9 @@ void PythonShell::exception(const QString &type, const QString &value, QList<QSt
|
||||
|
||||
QString exString;
|
||||
|
||||
if(finalLine >= 0)
|
||||
traceLine(QString(), finalLine);
|
||||
|
||||
if(!out->toPlainText().endsWith(QLatin1Char('\n')))
|
||||
exString = lit("\n");
|
||||
if(!frames.isEmpty())
|
||||
|
||||
Reference in New Issue
Block a user