0000826: reading from the python console for using pdb

This commit is contained in:
wmayer 2012-09-11 10:42:44 +02:00
parent a6bc50de63
commit 7a999faa06

View File

@ -647,10 +647,11 @@ void PythonConsole::printPrompt(PythonConsole::Prompt mode)
d->error = QString::null; d->error = QString::null;
} }
if (mode != PythonConsole::Special)
{
// Append the prompt string // Append the prompt string
QTextCursor cursor = textCursor(); QTextCursor cursor = textCursor();
if (mode != PythonConsole::Special)
{
cursor.beginEditBlock(); cursor.beginEditBlock();
cursor.movePosition(QTextCursor::End); cursor.movePosition(QTextCursor::End);
QTextBlock block = cursor.block(); QTextBlock block = cursor.block();
@ -676,12 +677,11 @@ void PythonConsole::printPrompt(PythonConsole::Prompt mode)
break; break;
} }
cursor.endEditBlock(); cursor.endEditBlock();
}
// move cursor to the end // move cursor to the end
cursor.movePosition(QTextCursor::End); cursor.movePosition(QTextCursor::End);
setTextCursor(cursor); setTextCursor(cursor);
} }
}
/** /**
* Appends \a output to the console and set \a state as user state to * Appends \a output to the console and set \a state as user state to