Merge pull request #3846
3f2a017
[Qt] Fix coin control qt5 checkbox bug in tree mode (Cozz Lovan)
This commit is contained in:
commit
74502e753b
1 changed files with 12 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue