Skip to content

Commit

Permalink
Connecting new Library to ActivityProgressWidget sooner. Fixes #2.
Browse files Browse the repository at this point in the history
  • Loading branch information
gvansickle committed Jan 2, 2018
1 parent 2342564 commit 2b68c4f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 4 additions & 0 deletions gui/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,10 @@ QSharedPointer<LibraryModel> MainWindow::openLibraryModelOnUrl(QUrl url)
{
// Create the new LibraryModel.
auto lib = QSharedPointer<LibraryModel>(new LibraryModel(this));

// Connect it to the ActivityProgressWidget, since as soon as we set the URL, async activity will start.
connectLibraryToActivityProgressWidget(lib.data(), m_activity_progress_widget);

m_libmodels.push_back(lib);
lib->setLibraryRootUrl(url);

Expand Down
4 changes: 1 addition & 3 deletions logic/LibraryModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -615,9 +615,7 @@ void LibraryModel::readFromJson(const QJsonObject& jo)
m_library.readFromJson(jsondoc.object());

connectSignals();
/// @todo
//self.statusSignal.emit(LibState.ScanningForFiles, 0, 0)
//self.startFileScanSignal.emit(self.library.rootURL)

endResetModel();
}

Expand Down

0 comments on commit 2b68c4f

Please sign in to comment.