checkbox clicked by user
| 352 | |
| 353 | // checkbox clicked by user |
| 354 | void CoinControlDialog::viewItemChanged(QTreeWidgetItem* item, int column) |
| 355 | { |
| 356 | if (column == COLUMN_CHECKBOX && item->data(COLUMN_ADDRESS, TxHashRole).toString().length() == 64) // transaction hash is 64 characters (this means it is a child node, so it is not a parent node in tree mode) |
| 357 | { |
| 358 | COutPoint outpt(uint256S(item->data(COLUMN_ADDRESS, TxHashRole).toString().toStdString()), item->data(COLUMN_ADDRESS, VOutRole).toUInt()); |
| 359 | |
| 360 | if (item->checkState(COLUMN_CHECKBOX) == Qt::Unchecked) |
| 361 | m_coin_control.UnSelect(outpt); |
| 362 | else if (item->isDisabled()) // locked (this happens if "check all" through parent node) |
| 363 | item->setCheckState(COLUMN_CHECKBOX, Qt::Unchecked); |
| 364 | else |
| 365 | m_coin_control.Select(outpt); |
| 366 | |
| 367 | // selection changed -> update labels |
| 368 | if (ui->treeWidget->isEnabled()) // do not update on every click for (un)select all |
| 369 | CoinControlDialog::updateLabels(m_coin_control, model, this); |
| 370 | } |
| 371 | } |
| 372 | |
| 373 | // shows count of locked unspent outputs |
| 374 | void CoinControlDialog::updateLabelLocked() |