mirror of https://github.com/JakubMelka/PDF4QT.git
Editor plugin: Bugfixing
This commit is contained in:
parent
ba0dd9e891
commit
72962f2513
|
@ -170,6 +170,11 @@ void PDFPageContentEditorEditedItemSettings::loadFromElement(PDFPageContentEleme
|
|||
QPen pen = pdf::PDFPainterHelper::createPenFromState(&graphicState, graphicState.getAlphaStroking());
|
||||
QBrush brush = pdf::PDFPainterHelper::createBrushFromState(&graphicState, graphicState.getAlphaFilling());
|
||||
|
||||
if (element->asText())
|
||||
{
|
||||
pen.setColor(brush.color());
|
||||
}
|
||||
|
||||
setPen(pen, true);
|
||||
setBrush(brush, true);
|
||||
}
|
||||
|
@ -247,7 +252,7 @@ void PDFPageContentEditorEditedItemSettings::saveToElement(PDFPageContentElement
|
|||
QTransform transform = PDFPainterHelper::composeTransform(decomposedTransformation);
|
||||
editedElement->getElement()->setTransform(transform);
|
||||
|
||||
if (editedElement->getElement()->asText() || editedElement->getElement()->asPath())
|
||||
if (editedElement->getElement()->asPath())
|
||||
{
|
||||
PDFPageContentProcessorState graphicState = editedElement->getElement()->getState();
|
||||
|
||||
|
@ -256,6 +261,16 @@ void PDFPageContentEditorEditedItemSettings::saveToElement(PDFPageContentElement
|
|||
|
||||
editedElement->getElement()->setState(graphicState);
|
||||
}
|
||||
|
||||
if (editedElement->getElement()->asText())
|
||||
{
|
||||
PDFPageContentProcessorState graphicState = editedElement->getElement()->getState();
|
||||
|
||||
QBrush brush(m_pen.color(), Qt::SolidPattern);
|
||||
PDFPainterHelper::applyBrushToGraphicState(&graphicState, brush);
|
||||
|
||||
editedElement->getElement()->setState(graphicState);
|
||||
}
|
||||
}
|
||||
|
||||
static int PDF_gcd(int a, int b)
|
||||
|
|
Loading…
Reference in New Issue