GUI: Fix #409
This commit is contained in:
parent
a5c85b7710
commit
c0a6040ded
|
@ -44,14 +44,16 @@ void HistoryLineEdit::keyPressEvent(QKeyEvent* event)
|
|||
mCmdIndex = mCmdIndex < -1 ? -1 : mCmdIndex;
|
||||
mCmdIndex = mCmdIndex > mCmdHistory.size() - 1 ? mCmdHistory.size() - 1 : mCmdIndex;
|
||||
|
||||
if(mCmdIndex == -1)
|
||||
{
|
||||
setText("");
|
||||
}
|
||||
else
|
||||
{
|
||||
setText(mCmdHistory.at(mCmdIndex));
|
||||
}
|
||||
// Set the new text if an existing command was available
|
||||
QString newText("");
|
||||
|
||||
if(mCmdIndex != -1)
|
||||
newText = mCmdHistory.at(mCmdIndex);
|
||||
|
||||
// Quote from QT docs: "Unlike textChanged(), this signal is not emitted when
|
||||
// the text is changed programmatically, for example, by calling setText()."
|
||||
setText(newText);
|
||||
emit textEdited(newText);
|
||||
}
|
||||
|
||||
QLineEdit::keyPressEvent(event);
|
||||
|
|
|
@ -259,7 +259,7 @@ MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent), ui(new Ui::MainWi
|
|||
|
||||
mCpuWidget->mDisas->setFocus();
|
||||
|
||||
GuiAddLogMessage(QString().sprintf("thread id (GUI thread) %X\n", GetCurrentThreadId()).toUtf8().constData());
|
||||
GuiAddLogMessage(QString().sprintf("Thread id (GUI thread) %X\n", GetCurrentThreadId()).toUtf8().constData());
|
||||
}
|
||||
|
||||
void MainWindow::closeEvent(QCloseEvent* event)
|
||||
|
|
Loading…
Reference in New Issue