mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-03 17:30:04 -05:00
More file cleanups
This commit is contained in:
@@ -373,12 +373,22 @@ void SyncWidget::handleTimer() {
|
||||
using namespace libtorrent;
|
||||
using FileFuture = openspace::DownloadManager::FileFuture;
|
||||
|
||||
std::vector<FileFuture*> toRemove;
|
||||
for (FileFuture* f : _futures) {
|
||||
InfoWidget* w = _futureInfoWidgetMap[f];
|
||||
|
||||
w->update(f->progress);
|
||||
if (f->isFinished) {
|
||||
toRemove.push_back(f);
|
||||
_downloadLayout->removeWidget(w);
|
||||
delete w;
|
||||
}
|
||||
else
|
||||
w->update(f->progress);
|
||||
}
|
||||
|
||||
for (FileFuture* f : toRemove)
|
||||
_futures.erase(std::remove(_futures.begin(), _futures.end(), f), _futures.end());
|
||||
|
||||
//_session->post_torrent_updates();
|
||||
//libtorrent::session_settings settings = _session->settings();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user