From ff613679a8068e977663fd075b8b5b5953178bde Mon Sep 17 00:00:00 2001 From: "G.K.MacGregor" Date: Mon, 7 Sep 2020 19:01:22 +0100 Subject: [PATCH] Refresh the page when an X/26 triplet is deleted. --- x26model.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/x26model.cpp b/x26model.cpp index 28ee4f9..2e4356f 100644 --- a/x26model.cpp +++ b/x26model.cpp @@ -572,6 +572,8 @@ bool X26Model::insertFirstRow() beginInsertRows(QModelIndex(), 0, 0); m_parentMainWidget->document()->currentSubPage()->localEnhance.insert(0, firstTriplet); endInsertRows(); + + // Since we always insert a Termination Marker there's no need to refresh the page return true; } @@ -584,6 +586,8 @@ bool X26Model::insertRows(int position, int rows, const QModelIndex &parent) for (int row=0; rowdocument()->currentSubPage()->localEnhance.insert(position+row, copyTriplet); endInsertRows(); + + // Since we always insert duplicates of the selected triplet there's no need to refresh the page return true; } @@ -596,6 +600,8 @@ bool X26Model::removeRows(int position, int rows, const QModelIndex &index) m_parentMainWidget->document()->currentSubPage()->localEnhance.removeAt(position+row); endRemoveRows(); + + m_parentMainWidget->refreshPage(); return true; } /*