Fix "Current with children" export option

Before that "Export to HTML -> Exported notes -> Current with children"
were exporting current note with its children and all following notes.

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
(cherry picked from commit 1a3f875b43)
r14.1.x
Alexander Golubev 2 weeks ago
parent 5a071aba6a
commit 20d4f9b4be

@ -301,7 +301,7 @@ bool TNote::saveHTMLBuf(TQTextStream& ts, TQValueVector<int>& depths,
depths.append(0);
collection->find(item->firstChild())->saveHTMLBuf(ts, depths, flags);
}
if ((SaveSubnotes | SaveAll) & flags && item->nextSibling())
if (SaveAll & flags && item->nextSibling())
collection->find(item->nextSibling())->saveHTMLBuf(ts, depths, flags);
if (!item->nextSibling()) depths.pop_back();
@ -331,7 +331,7 @@ bool TNote::saveHTMLTocEntry(TQTextStream& ts, TQValueVector<int>& depths, int f
depths.append(0);
collection->find(item->firstChild())->saveHTMLTocEntry(ts, depths, flags);
}
if ((SaveSubnotes | SaveAll) & flags && item->nextSibling())
if (SaveAll & flags && item->nextSibling())
collection->find(item->nextSibling())->saveHTMLTocEntry(ts, depths, flags);
if (!item->nextSibling()) {
depths.pop_back();

Loading…
Cancel
Save