ENH:adjust busy cursor position for job
jira: none Change-Id: I76b194ce2ca1669574427109dbb166b229a1f8a0
This commit is contained in:
parent
dac5e52a6a
commit
1a73f72d6b
|
@ -62,7 +62,6 @@ GUI::Job::Job(std::shared_ptr<ProgressIndicator> pri)
|
||||||
// to make sure they close, fade out, whathever
|
// to make sure they close, fade out, whathever
|
||||||
m_progress->set_progress(m_range);
|
m_progress->set_progress(m_range);
|
||||||
m_progress->set_cancel_callback();
|
m_progress->set_cancel_callback();
|
||||||
wxEndBusyCursor();
|
|
||||||
|
|
||||||
if (m_worker_error) {
|
if (m_worker_error) {
|
||||||
m_finalized = true;
|
m_finalized = true;
|
||||||
|
@ -86,7 +85,7 @@ GUI::Job::Job(std::shared_ptr<ProgressIndicator> pri)
|
||||||
|
|
||||||
finalize();
|
finalize();
|
||||||
}
|
}
|
||||||
|
wxEndBusyCursor();
|
||||||
// dont do finalization again for the same process
|
// dont do finalization again for the same process
|
||||||
m_finalized = true;
|
m_finalized = true;
|
||||||
}
|
}
|
||||||
|
@ -96,6 +95,8 @@ GUI::Job::Job(std::shared_ptr<ProgressIndicator> pri)
|
||||||
void GUI::Job::start()
|
void GUI::Job::start()
|
||||||
{ // Start the job. No effect if the job is already running
|
{ // Start the job. No effect if the job is already running
|
||||||
if (!m_running.load()) {
|
if (!m_running.load()) {
|
||||||
|
// Changing cursor to busy
|
||||||
|
wxBeginBusyCursor();
|
||||||
prepare();
|
prepare();
|
||||||
|
|
||||||
// Save the current status indicatior range and push the new one
|
// Save the current status indicatior range and push the new one
|
||||||
|
@ -110,9 +111,6 @@ void GUI::Job::start()
|
||||||
m_finalized = false;
|
m_finalized = false;
|
||||||
m_finalizing = false;
|
m_finalizing = false;
|
||||||
|
|
||||||
// Changing cursor to busy
|
|
||||||
wxBeginBusyCursor();
|
|
||||||
|
|
||||||
try { // Execute the job
|
try { // Execute the job
|
||||||
m_worker_error = nullptr;
|
m_worker_error = nullptr;
|
||||||
m_thread = create_thread([this] { this->run(m_worker_error); });
|
m_thread = create_thread([this] { this->run(m_worker_error); });
|
||||||
|
|
Loading…
Reference in New Issue