Do not show dialog when reloading file that requests fullscreen

When using Okular as previewer in PDFTex workflow, preparing beamer slides,
the following usability hell occurred:

* LaTex/Beamer slides should be compiled to PDF with metadata "StartFullScreen"
* But while editing, on every PDF change/and reload, the user gets a modal popup
  "The document requested to be launched in presentation mode." "Do you want to allow it?"

BUG: 361740
This commit is contained in:
Arshad Husain 2020-05-11 09:15:50 +02:00 committed by Albert Astals Cid
parent 4954395d08
commit 08a76adda1

View file

@ -1702,7 +1702,7 @@ bool Part::openFile()
// if the 'StartFullScreen' flag is set and we're not in viewer widget mode, or the command line flag was
// specified, start presentation
const bool presentationBecauseOfDocumentMetadata = ( m_embedMode != ViewerWidgetMode ) && m_document->metaData( QStringLiteral("StartFullScreen") ).toBool();
if ( presentationBecauseOfDocumentMetadata || m_cliPresentation )
if ( ( presentationBecauseOfDocumentMetadata || m_cliPresentation ) && !m_isReloading )
{
bool goAheadWithPresentationMode = true;
if ( !m_cliPresentation )