This commit is contained in:
UdjinM6 2015-01-30 03:45:24 +03:00
parent 7fafe5d3e1
commit bf45840527

View File

@ -17,6 +17,7 @@ void CoinControlTreeWidget::keyPressEvent(QKeyEvent *event)
{ {
event->ignore(); event->ignore();
int COLUMN_CHECKBOX = 0; int COLUMN_CHECKBOX = 0;
if(this->currentItem())
this->currentItem()->setCheckState(COLUMN_CHECKBOX, ((this->currentItem()->checkState(COLUMN_CHECKBOX) == Qt::Checked) ? Qt::Unchecked : Qt::Checked)); this->currentItem()->setCheckState(COLUMN_CHECKBOX, ((this->currentItem()->checkState(COLUMN_CHECKBOX) == Qt::Checked) ? Qt::Unchecked : Qt::Checked));
} }
else if (event->key() == Qt::Key_Escape) // press esc -> close dialog else if (event->key() == Qt::Key_Escape) // press esc -> close dialog