diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-08 22:46:48 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-08 22:46:48 +0300 |
commit | 6d4da51f0fdcecc2d4398f60dbca43f499fdbe16 (patch) | |
tree | c71c7c6e49ed36a55c6b6a2b1ba70073300634dd /src/gui/viewport.cpp | |
parent | 4125ac707288a244a7175b755d74dd963e762f56 (diff) | |
download | mv-6d4da51f0fdcecc2d4398f60dbca43f499fdbe16.tar.gz mv-6d4da51f0fdcecc2d4398f60dbca43f499fdbe16.tar.bz2 mv-6d4da51f0fdcecc2d4398f60dbca43f499fdbe16.tar.xz mv-6d4da51f0fdcecc2d4398f60dbca43f499fdbe16.zip |
Fix code style in gui.
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r-- | src/gui/viewport.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index af2125cb5..33690ba39 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -577,8 +577,11 @@ void Viewport::walkByMouse(const MouseEvent &event) int dy = 0; if (x2 > y2) { - if (y2 && x2 / y2 / wh > diff) + if (y2 && static_cast<float>(x2) / static_cast<float>(y2) + / wh > diff) + { y = 0; + } } else { |