-rw-r--r-- | core/launcher/documentlist.cpp | 8 | ||||
-rw-r--r-- | core/launcher/launcher.cpp | 10 | ||||
-rw-r--r-- | core/launcher/launcher.h | 2 | ||||
-rw-r--r-- | core/launcher/serverinterface.h | 2 |
4 files changed, 20 insertions, 2 deletions
diff --git a/core/launcher/documentlist.cpp b/core/launcher/documentlist.cpp index 59dd721..19ceb0f 100644 --- a/core/launcher/documentlist.cpp +++ b/core/launcher/documentlist.cpp @@ -69,5 +69,5 @@ public: void estimatedPercentScanned(); void appendDocpath(FileSystem*); - + DocLnkSet dls; @@ -191,4 +191,6 @@ void DocumentList::timerEvent( QTimerEvent *te ) if ( te->timerId() == d->tid ) { // Do 3 at a time + if ( d->serverGui ) + d->serverGui->aboutToAddBegin(); for (int i = 0; i < 3; i++ ) { const DocLnk *lnk = d->iterate(); @@ -204,5 +206,7 @@ void DocumentList::timerEvent( QTimerEvent *te ) break; } - } + } + if ( d->serverGui ) + d->serverGui->aboutToAddEnd(); } } diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index bf2287d..6afbcd8 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp @@ -697,4 +697,14 @@ void Launcher::documentAdded( const DocLnk& doc ) } +void Launcher::aboutToAddBegin() +{ + tabs->docView()->setUpdatesEnabled( false ); +} + +void Launcher::aboutToAddEnd() +{ + tabs->docView()->setUpdatesEnabled( true ); +} + void Launcher::showLoadingDocs() { diff --git a/core/launcher/launcher.h b/core/launcher/launcher.h index 4f3ff8c..29bd7db 100644 --- a/core/launcher/launcher.h +++ b/core/launcher/launcher.h @@ -111,4 +111,6 @@ public: void documentAdded( const DocLnk& doc ); void documentRemoved( const DocLnk& doc ); + void aboutToAddBegin(); + void aboutToAddEnd(); void allDocumentsRemoved(); void documentChanged( const DocLnk& oldDoc, const DocLnk& newDoc ); diff --git a/core/launcher/serverinterface.h b/core/launcher/serverinterface.h index e57ea51..132766f 100644 --- a/core/launcher/serverinterface.h +++ b/core/launcher/serverinterface.h @@ -51,4 +51,6 @@ public: // These functions notify of adding, removal and changes of document links used in the documents tab for example + virtual void aboutToAddBegin() {} + virtual void aboutToAddEnd() {} virtual void documentAdded( const DocLnk& doc ) = 0; virtual void documentRemoved( const DocLnk& doc ) = 0; |