Clear invocation QMaps on empty triplet list
Fixes a bug where local enhancements hung around when switching to a subpage without enhancements.
This commit is contained in:
19
decode.cpp
19
decode.cpp
@@ -32,6 +32,15 @@ TeletextPageDecode::Invocation::Invocation()
|
|||||||
m_fullScreenCLUT = -1;
|
m_fullScreenCLUT = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TeletextPageDecode::Invocation::clear()
|
||||||
|
{
|
||||||
|
m_characterMap.clear();
|
||||||
|
m_attributeMap.clear();
|
||||||
|
m_rightMostColumn.clear();
|
||||||
|
m_fullScreenCLUT = -1;
|
||||||
|
m_fullRowCLUTMap.clear();
|
||||||
|
}
|
||||||
|
|
||||||
void TeletextPageDecode::Invocation::setTripletList(X26TripletList *tripletList)
|
void TeletextPageDecode::Invocation::setTripletList(X26TripletList *tripletList)
|
||||||
{
|
{
|
||||||
m_tripletList = tripletList;
|
m_tripletList = tripletList;
|
||||||
@@ -62,11 +71,7 @@ void TeletextPageDecode::Invocation::buildMap(int level)
|
|||||||
else
|
else
|
||||||
endTripletNumber = m_endTripletNumber;
|
endTripletNumber = m_endTripletNumber;
|
||||||
|
|
||||||
m_characterMap.clear();
|
clear();
|
||||||
m_attributeMap.clear();
|
|
||||||
m_rightMostColumn.clear();
|
|
||||||
m_fullScreenCLUT = -1;
|
|
||||||
m_fullRowCLUTMap.clear();
|
|
||||||
|
|
||||||
for (int i=m_startTripletNumber; i<=endTripletNumber; i++) {
|
for (int i=m_startTripletNumber; i<=endTripletNumber; i++) {
|
||||||
const X26Triplet triplet = m_tripletList->at(i);
|
const X26Triplet triplet = m_tripletList->at(i);
|
||||||
@@ -221,8 +226,10 @@ void TeletextPageDecode::updateSidePanels()
|
|||||||
|
|
||||||
void TeletextPageDecode::buildInvocationList(Invocation &invocation, int objectType)
|
void TeletextPageDecode::buildInvocationList(Invocation &invocation, int objectType)
|
||||||
{
|
{
|
||||||
if (invocation.tripletList()->isEmpty())
|
if (invocation.tripletList()->isEmpty()) {
|
||||||
|
invocation.clear();
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|||||||
1
decode.h
1
decode.h
@@ -184,6 +184,7 @@ private:
|
|||||||
Invocation();
|
Invocation();
|
||||||
|
|
||||||
X26TripletList *tripletList() const { return m_tripletList; };
|
X26TripletList *tripletList() const { return m_tripletList; };
|
||||||
|
void clear();
|
||||||
void setTripletList(X26TripletList *);
|
void setTripletList(X26TripletList *);
|
||||||
int startTripletNumber() const { return m_startTripletNumber; };
|
int startTripletNumber() const { return m_startTripletNumber; };
|
||||||
void setStartTripletNumber(int);
|
void setStartTripletNumber(int);
|
||||||
|
|||||||
Reference in New Issue
Block a user