rakhimov / scram

Probabilistic Risk Analysis Tool (fault tree analysis, event tree analysis, etc.)
https://scram-pra.org
GNU General Public License v3.0
131 stars 54 forks source link

GUI: Allow panning the active window using the left mouse button (issue #277) #278

Closed bavovanachte closed 5 years ago

bavovanachte commented 5 years ago

As discussed in #277 : This PR allows panning the view using the mouse.

In the end, it is done using the left mouse button (iso the middle mouse one) for the sake of simplicity (this is provided out of the box with QGraphicsView and the middle mouse button implementations I found were a bit hacky)

There seems to be no conflict with the existing mouse pressing functionality (clicking the FTA elements). The view cannot be dragged if the user clicked on one of the FTA elements, but I didn't consider this an issue.

CLAassistant commented 5 years ago

CLA assistant check
All committers have signed the CLA.

codecov[bot] commented 5 years ago

Codecov Report

Merging #278 into develop will decrease coverage by 0.05%. The diff coverage is 0%.

@@             Coverage Diff             @@
##           develop     #278      +/-   ##
===========================================
- Coverage    76.29%   76.23%   -0.06%     
===========================================
  Files          124      124              
  Lines        12759    12768       +9     
  Branches      1704     1705       +1     
===========================================
  Hits          9734     9734              
- Misses        3010     3019       +9     
  Partials        15       15
bavovanachte commented 5 years ago

Not sure what's happening in the failing appveyor check. Seems unrelated to my changes?

rakhimov commented 5 years ago

Not sure what's happening in the failing appveyor check. Seems unrelated to my changes?

Yes, this is gcc-8.2 bug with std::variant.