summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-05-24 18:38:41 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-05-24 18:49:26 (GMT)
commit95ff0fccf5fdefc395091a16e278bf3c2cd9d865 (patch)
treed7517592dec8944af7b5db12c86ee0d66b9203a0 /Swift/QtUI/QtStatusWidget.cpp
parentff464cee022c75258405ab01ebeedf7bc1c79aa0 (diff)
downloadswift-contrib-95ff0fccf5fdefc395091a16e278bf3c2cd9d865.zip
swift-contrib-95ff0fccf5fdefc395091a16e278bf3c2cd9d865.tar.bz2
Various cleanups
Diffstat (limited to 'Swift/QtUI/QtStatusWidget.cpp')
-rw-r--r--Swift/QtUI/QtStatusWidget.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/Swift/QtUI/QtStatusWidget.cpp b/Swift/QtUI/QtStatusWidget.cpp
index a5eda8b..e909f5c 100644
--- a/Swift/QtUI/QtStatusWidget.cpp
+++ b/Swift/QtUI/QtStatusWidget.cpp
@@ -93,13 +93,16 @@ void QtStatusWidget::handleApplicationFocusChanged(QWidget* /*old*/, QWidget* no
if (stack_->currentIndex() == 0) {
return;
}
- if (now != menu_ && now != statusEdit_) {
+ if (!now || (now != menu_ && now != statusEdit_ && !now->isAncestorOf(statusEdit_) && !now->isAncestorOf(menu_) && !statusEdit_->isAncestorOf(now) && !menu_->isAncestorOf(now))) {
handleEditCancelled();
}
+
}
void QtStatusWidget::mousePressEvent(QMouseEvent*) {
- handleClicked();
+ if (stack_->currentIndex() == 0) {
+ handleClicked();
+ }
}
void QtStatusWidget::generateList() {