Merge lp:~tapaal-contributor/tapaal/interrupted-scrolling-1938783 into lp:tapaal

Proposed by Lena Ernstsen
Status: Merged
Approved by: Jiri Srba
Approved revision: 1131
Merged at revision: 1131
Proposed branch: lp:~tapaal-contributor/tapaal/interrupted-scrolling-1938783
Merge into: lp:tapaal
Diff against target: 22 lines (+11/-0)
1 file modified
src/dk/aau/cs/gui/TabContent.java (+11/-0)
To merge this branch: bzr merge lp:~tapaal-contributor/tapaal/interrupted-scrolling-1938783
Reviewer Review Type Date Requested Status
Jiri Srba Approve
Kenneth Yrke Jørgensen code Approve
Review via email: mp+406648@code.launchpad.net

Commit message

Scroll will not be interrupted by arcs anymore

Description of the change

When hitting an arc or arc point while scrolling it will not halt

To post a comment you must log in.
Revision history for this message
Kenneth Yrke Jørgensen (yrke) :
review: Approve (code)
Revision history for this message
Jiri Srba (srba) wrote :

tested and works

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/dk/aau/cs/gui/TabContent.java'
2--- src/dk/aau/cs/gui/TabContent.java 2021-07-27 12:51:40 +0000
3+++ src/dk/aau/cs/gui/TabContent.java 2021-08-04 11:22:35 +0000
4@@ -2760,7 +2760,18 @@
5 e->e.pno instanceof TimedTransitionComponent && e.a == MouseAction.wheel,
6 e->timedTranstionMouseWheelWithShift(((TimedTransitionComponent) e.pno), ((MouseWheelEvent) e.e))
7 );
8+ registerEvent(
9+ e->e.pno instanceof Arc && e.a == MouseAction.wheel,
10+ e->arcMouseWheel((PetriNetObject) e.pno, e.e)
11+ );
12+ registerEvent(
13+ e->e.pno instanceof ArcPathPoint && e.a == MouseAction.wheel,
14+ e->arcMouseWheel(((PetriNetObject) e.pno), e.e)
15+ );
16+ }
17
18+ private void arcMouseWheel(PetriNetObject pno, MouseEvent e) {
19+ pno.getParent().dispatchEvent(e);
20 }
21
22 private void timedTranstionMouseWheelWithShift(TimedTransitionComponent p, MouseWheelEvent e) {

Subscribers

People subscribed via source and target branches