Browse Source

fix crash: CoinControl "space" bug

Just like baf80c26a2
tags/v0.15.1
fsb4000 6 years ago
parent
commit
0eade74c78
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      src/qt/coincontroltreewidget.cpp

+ 3
- 2
src/qt/coincontroltreewidget.cpp View File

@@ -17,7 +17,8 @@ void CoinControlTreeWidget::keyPressEvent(QKeyEvent *event)
{
event->ignore();
int COLUMN_CHECKBOX = 0;
this->currentItem()->setCheckState(COLUMN_CHECKBOX, ((this->currentItem()->checkState(COLUMN_CHECKBOX) == Qt::Checked) ? Qt::Unchecked : Qt::Checked));
if(this->currentItem())
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
{
@@ -29,4 +30,4 @@ void CoinControlTreeWidget::keyPressEvent(QKeyEvent *event)
{
this->QTreeWidget::keyPressEvent(event);
}
}
}

Loading…
Cancel
Save