Editor plugin: Bugfixing

This commit is contained in:
Jakub Melka
2024-06-09 18:29:38 +02:00
parent f78fb54607
commit b43b4c1874
6 changed files with 80 additions and 17 deletions

View File

@ -193,7 +193,12 @@ bool EditorPlugin::save()
{
pdf::PDFDocumentModifier modifier(m_document);
std::set<pdf::PDFInteger> pageIndices = m_scene.getPageIndices();
std::set<pdf::PDFInteger> pageIndices;
for (const auto& item : m_editedPageContent)
{
pageIndices.insert(item.first);
}
auto elementsByPage = m_scene.getElementsByPage();
for (pdf::PDFInteger pageIndex : pageIndices)
{
@ -221,6 +226,8 @@ bool EditorPlugin::save()
const pdf::PDFPageContentImageElement* elementImage = element->asElementImage();
const pdf::PDFPageContentElementTextBox* elementTextBox = element->asElementTextBox();
// TODO: Impelement all things
if (editedElement)
{
contentStreamBuilder.writeEditedElement(editedElement->getElement());