D16285: Remember printing option and print range in the print dialog

Ahmad Osama noreply at phabricator.kde.org
Sun Oct 21 21:24:10 BST 2018


ahmadosama added a comment.


  In D16285#346944 <https://phabricator.kde.org/D16285#346944>, @aacid wrote:
  
  > In D16285#346879 <https://phabricator.kde.org/D16285#346879>, @ahmadosama wrote:
  >
  > > In D16285#346864 <https://phabricator.kde.org/D16285#346864>, @aacid wrote:
  > >
  > > > If you're not going to save the data, why are you adding it to  the docinfo xml?
  > > >
  > > > If this is only for remembering the options while okular is open i don't even think it makes sense storing it into document at all and should just be stored in Part  as something like a QMap<Document,PrinterOptions>
  > >
  > >
  > > I am adding the data to the docinfo xml to remember those data when the file is reopened even after closing Okular the printing data would be remembered for the same file.
  >
  >
  > But you just said "I reset the printing options when closing the document".
  >
  > So I'm confused.
  >
  > Is the plan to remember options between different Okular executions or is it no?
  
  
  I apologize for my confusing comments.
  Yes, the plan is to remember printing options between different executions similar to remembering the document rotation.
  
  The problem in my first patch was that if I have an opened document X and then close this document,
  and opened another document Y the printing options of X will be used in Y, so I added this part
  
    d->m_printRangeOption = QPrinter::AllPages;
    d->m_printFrom = -1;
    d->m_printTo = -1;
  
  similar to what is done to the rotation:
  
    d->m_rotation = Rotation0;
  
  to restore the printing options to the default values.
  This is what I meant by resetting and I apologize again for not being clear.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D16285

To: ahmadosama, #okular
Cc: aacid, yurchor, broulik, ngraham, okular-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20181021/304be4c9/attachment.html>


More information about the Okular-devel mailing list