Fix potential non-refresh on selecting last subpage

This commit is contained in:
G.K.MacGregor
2021-01-03 20:35:57 +00:00
parent 3fe01932e3
commit 3455625fb6

View File

@@ -69,7 +69,7 @@ void TeletextDocument::setPacketCoding(PacketCodingEnum newPacketEncoding)
void TeletextDocument::selectSubPageIndex(int newSubPageIndex, bool forceRefresh)
{
// forceRefresh overrides "beyond the last subpage" check, so inserting a subpage after the last one still shows - dangerous workaround?
if (forceRefresh || (newSubPageIndex != m_currentSubPageIndex && newSubPageIndex < m_subPages.size()-1)) {
if (forceRefresh || (newSubPageIndex != m_currentSubPageIndex && newSubPageIndex < m_subPages.size())) {
emit aboutToChangeSubPage();
m_currentSubPageIndex = newSubPageIndex;
emit subPageSelected();