summaryrefslogtreecommitdiff
path: root/client/macrodrawer.cc
diff options
context:
space:
mode:
authordeva <deva>2009-03-20 13:52:25 +0000
committerdeva <deva>2009-03-20 13:52:25 +0000
commit539e037777955d7bc7face4ac1e62a18756d104d (patch)
tree9c9d17a4d3a011d12a16471e407f60ca52714799 /client/macrodrawer.cc
parent8ca8f7da56f0524fde5cbbecb557c29a1b777ef5 (diff)
Fixed crash on doubleclik on the frame.
Diffstat (limited to 'client/macrodrawer.cc')
-rw-r--r--client/macrodrawer.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/client/macrodrawer.cc b/client/macrodrawer.cc
index 72395bb..ec761e9 100644
--- a/client/macrodrawer.cc
+++ b/client/macrodrawer.cc
@@ -53,7 +53,8 @@ MacroDrawer::MacroDrawer(MacroWindow *p, QString title)
}
installEventFilter(this);
- connect(b, SIGNAL(clicked()), mw, SLOT(toggleMacro()));
+ // connect(b, SIGNAL(clicked()), mw, SLOT(toggleMacro()));
+ connect(b, SIGNAL(clicked()), this, SLOT(toggleMe()));
}
}
@@ -61,7 +62,12 @@ bool MacroDrawer::eventFilter(QObject *obj, QEvent *event)
{
if(event->type() == QEvent::MouseButtonRelease) {
QMouseEvent *mouseEvent = static_cast<QMouseEvent *>(event);
- if(mouseEvent->y() < 16) mw->toggleMacro(); // Only activate when clicking the top.
+ if(mouseEvent->y() < 16 && isEnabled()) toggle();//mw->toggleMacro(); // Only activate when clicking the top.
}
return QObject::eventFilter(obj, event);
}
+
+void MacroDrawer::toggleMe()
+{
+ emit toggle();
+}