From 40047b1e661d37cd9ce8ed60c5e8ed8bd8cc73d1 Mon Sep 17 00:00:00 2001 From: Aiwe Date: Fri, 14 Jan 2022 20:08:32 +0200 Subject: [PATCH] Don't startup mining on sync after mining was stopped manually, evidently user doesn't want mining --- src/gui/MiningFrame.cpp | 3 ++- src/gui/MiningFrame.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/MiningFrame.cpp b/src/gui/MiningFrame.cpp index e9130b21e..f6066bfb0 100644 --- a/src/gui/MiningFrame.cpp +++ b/src/gui/MiningFrame.cpp @@ -207,6 +207,7 @@ void MiningFrame::stopSolo() { m_ui->m_cpuDial->setEnabled(true); } m_solo_mining = false; + m_mining_was_stopped = true; } } @@ -215,7 +216,7 @@ void MiningFrame::enableSolo() { if (!m_solo_mining && !m_miner->is_mining()) { m_ui->m_startSolo->setEnabled(true); m_ui->m_stopSolo->setEnabled(false); - if (Settings::instance().isMiningOnLaunchEnabled() && m_sychronized) { + if (!m_mining_was_stopped && Settings::instance().isMiningOnLaunchEnabled() && m_sychronized) { startSolo(); } } diff --git a/src/gui/MiningFrame.h b/src/gui/MiningFrame.h index 21729b84a..5f98742e9 100644 --- a/src/gui/MiningFrame.h +++ b/src/gui/MiningFrame.h @@ -51,6 +51,7 @@ class MiningFrame : public QFrame { bool m_wallet_closed = false; bool m_solo_mining = false; bool m_sychronized = false; + bool m_mining_was_stopped = false; void walletOpened(); void walletClosed();