aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2017-11-14 19:12:46 +0100
committerStig Bjørlykke <stig@bjorlykke.org>2017-11-15 07:21:31 +0000
commit129ffaf11b704141b9d1049b4bd293744493d4ad (patch)
treefa072f099f30d33f416fdc9caeab491136535736
parent435a8fb79ce4a482ede1764ef77ccfe8eb7f931d (diff)
Qt: Update UAT clear button enabling
Check for enabling the clear button when loading a UatFrame. Change-Id: Id9bbe4f99314d2798c4bccf10b57db99431a00fd Reviewed-on: https://code.wireshark.org/review/24412 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
-rw-r--r--ui/qt/uat_frame.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/qt/uat_frame.cpp b/ui/qt/uat_frame.cpp
index e922ddd..c9c493f 100644
--- a/ui/qt/uat_frame.cpp
+++ b/ui/qt/uat_frame.cpp
@@ -106,6 +106,7 @@ void UatFrame::setUat(epan_uat *uat)
uat_delegate_ = new UatDelegate;
ui->uatTreeView->setModel(uat_model_);
ui->uatTreeView->setItemDelegate(uat_delegate_);
+ ui->clearToolButton->setEnabled(uat_model_->rowCount() != 0);
connect(uat_model_, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
this, SLOT(modelDataChanged(QModelIndex)));