D10048: [PATCH 2/4] Communicate calculate text change to formwidgets
Albert Astals Cid
noreply at phabricator.kde.org
Wed Feb 7 23:19:11 UTC 2018
aacid added a comment.
In https://phabricator.kde.org/D10048#202336, @aheinecke wrote:
> I had another look at this and I could not get it to work with refreshPixmaps and I don't understand how the FormWidget should be updated if the text of the underlying FormField changes. The only setTexts I see in the FormWidgets are in the Ctor or in the "slotHandleTextChangedByUndoRedo" I'm probably overlooking something :-/
>
> So I tried it out and added another Field "JSSum" to the example PDF I'm using F5696675: simple_calculate.pdf <https://phabricator.kde.org/F5696675> which had a calculate script that modified a field value through a JavaScript assignment and it also did not work there: F5696683: calculate-not-working.gif <https://phabricator.kde.org/F5696683> So maybe there was a regression at some point?
>
> Could you attach a sample PDF where this is working?
https://www.revenue.wi.gov/dorforms/2016-Form1f.pdf
> Sorry I don't want to create additional work for you but I did not find one by searching for related bugs in BKO.
>
> The Versions I tried were unmodified master (https://phabricator.kde.org/R223:e06883d102f06bf99ffcf29845fcc4e3e0622d62) and Okular 0.26.1 which I have from my debian distro.
>
> To be clear:
> I'm still planning to make changes to this revision but I first want to figure out if there is an already working update mechanism between FormField and FormWidget that I have overlooked or if the one that was in place needs a fix.
Well you need the refresh pixmaps for sure, because at least right now when hiding the forms the image of the pdf has the wrong value, so that needs fixing.
As for the difference with the pdf i linked, i think i see the difference, the ones you linked the all the widgets are so you need to update the "result" widgets values.
Could you explore getting that value from the core of poppler and not setting the value in the ui manually? I mean if you force a pixmap refresh (by zooming in/out) the values of the rendered "image" update correctly so somewhere something knows the value changed. I'd prefer using that over going manually and setting the value "again"
> Thanks,
> Andre
REPOSITORY
R223 Okular
REVISION DETAIL
https://phabricator.kde.org/D10048
To: aheinecke, #okular
Cc: aacid, michaelweghorn, ngraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20180207/4709320b/attachment.html>
More information about the Okular-devel
mailing list