mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-01-08 11:11:51 +00:00
parent
531ef2d26a
commit
c826183ed5
@ -1,5 +1,8 @@
|
||||
2015-06-01 Moritz Bunkus <moritz@bunkus.org>
|
||||
|
||||
* MKVToolNix GUI: bug fix: running jobs cannot be removed from the
|
||||
job queue anymore. Fixes #1220.
|
||||
|
||||
* MKVToolNix GUI: bug fix: when starting the GUI old jobs from the
|
||||
queue were silently discarded if they included additional parts
|
||||
(e.g. VOBs).
|
||||
|
@ -125,11 +125,23 @@ Tool::onStart() {
|
||||
|
||||
void
|
||||
Tool::onRemove() {
|
||||
auto idsToRemove = QMap<uint64_t, bool>{};
|
||||
auto idsToRemove = QMap<uint64_t, bool>{};
|
||||
auto emitRunningWarning = false;
|
||||
|
||||
m_model->withSelectedJobs(ui->jobs, [&idsToRemove](Job &job) { idsToRemove[job.m_id] = true; });
|
||||
|
||||
m_model->removeJobsIf([&](Job const &job) { return idsToRemove[job.m_id]; });
|
||||
m_model->removeJobsIf([&idsToRemove, &emitRunningWarning](Job const &job) -> bool {
|
||||
if (!idsToRemove[job.m_id])
|
||||
return false;
|
||||
if (Job::Running != job.m_status)
|
||||
return true;
|
||||
|
||||
emitRunningWarning = true;
|
||||
return false;
|
||||
});
|
||||
|
||||
if (emitRunningWarning)
|
||||
MainWindow::get()->setStatusBarMessage(QY("Running jobs cannot be removed."));
|
||||
}
|
||||
|
||||
void
|
||||
@ -149,7 +161,18 @@ Tool::onRemoveDoneOk() {
|
||||
|
||||
void
|
||||
Tool::onRemoveAll() {
|
||||
m_model->removeJobsIf([this](Job const &) { return true; });
|
||||
auto emitRunningWarning = false;
|
||||
|
||||
m_model->removeJobsIf([&emitRunningWarning](Job const &job) -> bool {
|
||||
if (Job::Running != job.m_status)
|
||||
return true;
|
||||
|
||||
emitRunningWarning = true;
|
||||
return false;
|
||||
});
|
||||
|
||||
if (emitRunningWarning)
|
||||
MainWindow::get()->setStatusBarMessage(QY("Running jobs cannot be removed."));
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user