Merge remote-tracking branch 'origin/Applications/17.08'

remotes/origin/Applications/17.12
Albert Astals Cid 9 years ago
commit 470df16700
  1. 8
      part.cpp
  2. 1
      part.h

@ -294,7 +294,7 @@ Part::Part(QWidget *parentWidget,
QObject *parent,
const QVariantList &args)
: KParts::ReadWritePart(parent),
m_tempfile( 0 ), m_fileWasRemoved( false ), m_showMenuBarAction( 0 ), m_showFullScreenAction( 0 ), m_actionsSearched( false ),
m_tempfile( 0 ), m_isReloading( false ), m_fileWasRemoved( false ), m_showMenuBarAction( 0 ), m_showFullScreenAction( 0 ), m_actionsSearched( false ),
m_cliPresentation(false), m_cliPrint(false), m_embedMode(detectEmbedMode(parentWidget, parent, args)), m_generatorGuiClient(0), m_keeper( 0 )
{
// make sure that the component name is okular otherwise the XMLGUI .rc files are not found
@ -1773,6 +1773,12 @@ void Part::slotFileDirty( const QString& path )
void Part::slotDoFileDirty()
{
// Skip reload when another reload is already in progress
if ( m_isReloading ) {
return;
}
QScopedValueRollback<bool> rollback(m_isReloading, true);
bool tocReloadPrepared = false;
// do the following the first time the file is reloaded

@ -293,6 +293,7 @@ class OKULARPART_EXPORT Part : public KParts::ReadWritePart, public Okular::Docu
QTimer *m_dirtyHandler;
QUrl m_oldUrl;
Okular::DocumentViewport m_viewportDirty;
bool m_isReloading;
bool m_wasPresentationOpen;
QWidget *m_dirtyToolboxItem;
bool m_wasSidebarVisible;

Loading…
Cancel
Save