mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2025-05-28 03:10:28 -04:00
fix: Correct removing latest item in messages list
This commit is contained in:
parent
2fe6850a06
commit
cfb364f033
@ -202,7 +202,7 @@ void ChatModel::resetModelTo(int index)
|
|||||||
if (index < 0 || index >= m_messages.size())
|
if (index < 0 || index >= m_messages.size())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (index < m_messages.size() - 1) {
|
if (index < m_messages.size()) {
|
||||||
beginRemoveRows(QModelIndex(), index, m_messages.size() - 1);
|
beginRemoveRows(QModelIndex(), index, m_messages.size() - 1);
|
||||||
m_messages.remove(index, m_messages.size() - index);
|
m_messages.remove(index, m_messages.size() - index);
|
||||||
endRemoveRows();
|
endRemoveRows();
|
||||||
|
@ -140,8 +140,7 @@ Rectangle {
|
|||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
right: parent.right
|
right: parent.right
|
||||||
bottom: parent.bottom
|
top: parent.top
|
||||||
bottomMargin: 2
|
|
||||||
}
|
}
|
||||||
|
|
||||||
text: qsTr("ResetTo")
|
text: qsTr("ResetTo")
|
||||||
|
Loading…
Reference in New Issue
Block a user