GUI: don't add same thing to the history twice
This commit is contained in:
parent
95cacb3732
commit
67e095efb5
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue