Merge bitcoin/bitcoin#21714: refactor: Drop CCoinControl::SetNull

c5a470eee1 refactor: Drop CCoinControl::SetNull (João Barbosa)

Pull request description:

  The only external call to `SetNull` is changed as follow

  ```diff
  - m_coin_control->SetNull();
  + m_coin_control = std::make_unique<CCoinControl>();
  ```

ACKs for top commit:
  theStack:
    Code-Review ACK c5a470eee1
  MarcoFalke:
    review ACK c5a470eee1 🍤

Tree-SHA512: 2588828720cdcf405fc4fb06f2aa17ad4eef2a645e12d820311006127e732258dd084993f17f23742f8e7f782e18289a6199dcec3690efc9b92458f90b816a8f
This commit is contained in:
MarcoFalke
2021-04-26 09:20:39 +02:00
3 changed files with 13 additions and 31 deletions

View File

@@ -839,8 +839,9 @@ void SendCoinsDialog::coinControlFeatureChanged(bool checked)
{
ui->frameCoinControl->setVisible(checked);
if (!checked && model) // coin control features disabled
m_coin_control->SetNull();
if (!checked && model) { // coin control features disabled
m_coin_control = std::make_unique<CCoinControl>();
}
coinControlUpdateLabels();
}