Get "empty document detection" working
This commit is contained in:
10
document.cpp
10
document.cpp
@@ -29,7 +29,6 @@ TeletextDocument::TeletextDocument()
|
||||
m_description.clear();
|
||||
m_pageFunction = PFLevelOnePage;
|
||||
m_packetCoding = Coding7bit;
|
||||
m_empty = true;
|
||||
m_subPages.push_back(new LevelOnePage);
|
||||
m_currentSubPageIndex = 0;
|
||||
m_undoStack = new QUndoStack(this);
|
||||
@@ -44,6 +43,15 @@ TeletextDocument::~TeletextDocument()
|
||||
delete(subPage);
|
||||
}
|
||||
|
||||
bool TeletextDocument::isEmpty() const
|
||||
{
|
||||
for (auto &subPage : m_subPages)
|
||||
if (!subPage->isEmpty())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
void TeletextDocument::setPageFunction(PageFunctionEnum newPageFunction)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user