aboutsummaryrefslogtreecommitdiffstats
path: root/src/gui/EdgeView.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/EdgeView.cpp')
-rw-r--r--src/gui/EdgeView.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/EdgeView.cpp b/src/gui/EdgeView.cpp
index faa89d0..dceb0d0 100644
--- a/src/gui/EdgeView.cpp
+++ b/src/gui/EdgeView.cpp
@@ -68,17 +68,17 @@ EdgeView::update_label()
bool
EdgeView::on_event(GdkEvent* ev)
{
- using namespace std;
-
if (ev->type == GDK_BUTTON_PRESS) {
- if (ev->button.button == 1) {
- _edge->set_probability(_edge->probability() - 0.1);
- update_label();
- return true;
- } else if (ev->button.button == 3) {
- _edge->set_probability(_edge->probability() + 0.1);
- update_label();
- return true;
+ if (ev->button.state & GDK_CONTROL_MASK) {
+ if (ev->button.button == 1) {
+ _edge->set_probability(_edge->probability() - 0.1);
+ update_label();
+ return true;
+ } else if (ev->button.button == 3) {
+ _edge->set_probability(_edge->probability() + 0.1);
+ update_label();
+ return true;
+ }
}
}