summaryrefslogtreecommitdiff
path: root/src/gui/widgets/window.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2020-02-23 09:30:51 +0300
committerAndrei Karas <akaras@inbox.ru>2020-02-23 09:30:51 +0300
commit1e2a88e975019929c4c7e3154537865cc09550a6 (patch)
treeae8bc68ad3a3f6b61a5e2d511d7fc17daa22bd0e /src/gui/widgets/window.cpp
parent6941fd4eeb1dce20aba8c42fd030c2690c37b731 (diff)
downloadmanaverse-1e2a88e975019929c4c7e3154537865cc09550a6.tar.gz
manaverse-1e2a88e975019929c4c7e3154537865cc09550a6.tar.bz2
manaverse-1e2a88e975019929c4c7e3154537865cc09550a6.tar.xz
manaverse-1e2a88e975019929c4c7e3154537865cc09550a6.zip
Fix some code style issues
Diffstat (limited to 'src/gui/widgets/window.cpp')
-rw-r--r--src/gui/widgets/window.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index deebfd5ef..2d51a49c0 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -1011,7 +1011,6 @@ void Window::mouseDragged(MouseEvent &event)
if ((mouseResize != 0) && !mMoved)
{
- const int dx = event.getX() - mDragOffsetX;
const int dy = event.getY() - mDragOffsetY;
Rect newDim = getDimension();
@@ -1028,6 +1027,7 @@ void Window::mouseDragged(MouseEvent &event)
if ((mouseResize & (LEFT | RIGHT)) != 0)
{
+ const int dx = event.getX() - mDragOffsetX;
const int newWidth = newDim.width
+ ((mouseResize & LEFT) != 0 ? -dx : dx);
newDim.width = std::min(mMaxWinWidth,