1
0
Fork 0

GUI: don't add same thing to the history twice

This commit is contained in:
Duncan Ogilvie 2018-07-01 19:03:12 +02:00
parent 95cacb3732
commit 67e095efb5
1 changed files with 2 additions and 1 deletions

View File

@ -40,7 +40,8 @@ void HistoryLineEdit::addLineToHistory(QString parLine)
if(mCmdHistory.size() > mCmdHistoryMaxSize)
mCmdHistory.removeLast();
mCmdHistory.prepend(parLine);
if(mCmdHistory.empty() || mCmdHistory.first() != parLine)
mCmdHistory.prepend(parLine);
mCmdIndex = -1;
}