diff options
author | Cozz Lovan <cozzlovan@yahoo.com> | 2014-03-11 13:42:00 +0100 |
---|---|---|
committer | Cozz Lovan <cozzlovan@yahoo.com> | 2014-03-11 14:16:48 +0100 |
commit | 3f2a0172f5295e139e0077d02d26699397a4a19f (patch) | |
tree | 91e92b4ce2b1b7dae47b21b06432593bfa235ba3 /src/qt/coincontroldialog.cpp | |
parent | 1264b3647d48c61b033f5e3d20ffbb84ed77c369 (diff) |
[Qt] Fix coin control qt5 checkbox bug in tree mode
Diffstat (limited to 'src/qt/coincontroldialog.cpp')
-rw-r--r-- | src/qt/coincontroldialog.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp index 1e5a2efc94..f0d48baf90 100644 --- a/src/qt/coincontroldialog.cpp +++ b/src/qt/coincontroldialog.cpp @@ -386,6 +386,18 @@ void CoinControlDialog::viewItemChanged(QTreeWidgetItem* item, int column) if (ui->treeWidget->isEnabled()) // do not update on every click for (un)select all CoinControlDialog::updateLabels(model, this); } + + // todo: this is a temporary qt5 fix: when clicking a parent node in tree mode, the parent node + // including all childs are partially selected. But the parent node should be fully selected + // as well as the childs. Childs should never be partially selected in the first place. + // Please remove this ugly fix, once the bug is solved upstream. +#if QT_VERSION >= 0x050000 + else if (column == COLUMN_CHECKBOX && item->childCount() > 0) + { + if (item->checkState(COLUMN_CHECKBOX) == Qt::PartiallyChecked && item->child(0)->checkState(COLUMN_CHECKBOX) == Qt::PartiallyChecked) + item->setCheckState(COLUMN_CHECKBOX, Qt::Checked); + } +#endif } // return human readable label for priority number |