From 3f62edd68e1633248c2c3d79289f18ded463b0d5 Mon Sep 17 00:00:00 2001 From: tosh Date: Mon, 1 Jul 2013 10:53:49 +0200 Subject: [PATCH] makes bandwidth details dialog properly close (and reopen) on ESC key --- interface/src/ui/BandwidthDialog.cpp | 6 ++++++ interface/src/ui/BandwidthDialog.h | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/interface/src/ui/BandwidthDialog.cpp b/interface/src/ui/BandwidthDialog.cpp index f2e6ca2377..7879816d7c 100644 --- a/interface/src/ui/BandwidthDialog.cpp +++ b/interface/src/ui/BandwidthDialog.cpp @@ -59,6 +59,12 @@ void BandwidthDialog::paintEvent(QPaintEvent* event) { this->setFixedSize(this->width(), this->height()); } +void BandwidthDialog::reject() { + + // Just regularly close upon ESC + this->QDialog::close(); +} + void BandwidthDialog::closeEvent(QCloseEvent* event) { this->QDialog::closeEvent(event); diff --git a/interface/src/ui/BandwidthDialog.h b/interface/src/ui/BandwidthDialog.h index d88c0de34a..636e91dce9 100644 --- a/interface/src/ui/BandwidthDialog.h +++ b/interface/src/ui/BandwidthDialog.h @@ -26,6 +26,10 @@ signals: void closed(); +public slots: + + void reject(); + protected: // State <- data model held by BandwidthMeter