Fix button delete icon

This commit is contained in:
Svetlana Kulikova
2025-05-29 13:10:44 +03:00
parent 32cfb4f71b
commit ba77ddc78e
2 changed files with 9 additions and 8 deletions

View File

@ -2917,10 +2917,7 @@ HRESULT CPdfWriter::EditWidgetParents(NSFonts::IApplicationFonts* pAppFonts, CWi
if (pPBWidget->m_nI >= 0)
DrawButtonWidget(pAppFonts, pPBWidget, 0, arrForm[pPBWidget->m_nI]);
if (pPBWidget->m_nRI >= 0)
{
if (arrForm[pPBWidget->m_nRI])
DrawButtonWidget(pAppFonts, pPBWidget, 1, arrForm[pPBWidget->m_nRI]);
}
DrawButtonWidget(pAppFonts, pPBWidget, 1, arrForm[pPBWidget->m_nRI]);
else if (pPBWidget->m_nI >= 0)
{
PdfWriter::CDictObject* pObj = dynamic_cast<PdfWriter::CDictObject*>(pPBWidget->Get("AP"));
@ -2932,10 +2929,7 @@ HRESULT CPdfWriter::EditWidgetParents(NSFonts::IApplicationFonts* pAppFonts, CWi
}
}
if (pPBWidget->m_nIX >= 0)
{
if (arrForm[pPBWidget->m_nIX])
DrawButtonWidget(pAppFonts, pPBWidget, 2, arrForm[pPBWidget->m_nIX]);
}
DrawButtonWidget(pAppFonts, pPBWidget, 2, arrForm[pPBWidget->m_nIX]);
else if (pPBWidget->m_nI >= 0)
{
PdfWriter::CDictObject* pObj = dynamic_cast<PdfWriter::CDictObject*>(pPBWidget->Get("AP"));
@ -4333,6 +4327,8 @@ void CPdfWriter::DrawButtonWidget(NSFonts::IApplicationFonts* pAppFonts, PdfWrit
if (!pButtonWidget->HaveBorder() && pButtonWidget->HaveBC())
pButtonWidget->SetBorder(0, 1, {});
if (!pForm)
nTP = 0;
if (!wsValue.empty() && nTP != 1)
{

View File

@ -1857,6 +1857,11 @@ namespace PdfWriter
std::string sAP = nAP == 0 ? "I" : (nAP == 1 ? "RI" : "IX");
m_pMK->Add(sAP, pForm);
}
else if (m_pMK)
{
std::string sAP = nAP == 0 ? "I" : (nAP == 1 ? "RI" : "IX");
m_pMK->Remove(sAP);
}
if (pCodes)
{