summaryrefslogtreecommitdiff
path: root/src/gui/windows/npcdialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-23 02:30:20 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-23 02:30:20 +0300
commit648c85816ca9398dd9c672d5d4230bef030e0274 (patch)
tree1d897dff70e183cb8c31f558426921be8dcf6ce7 /src/gui/windows/npcdialog.cpp
parent6336dabcb33ca6b4d417b352fa0b12651b6f4c57 (diff)
downloadmanaplus-648c85816ca9398dd9c672d5d4230bef030e0274.tar.gz
manaplus-648c85816ca9398dd9c672d5d4230bef030e0274.tar.bz2
manaplus-648c85816ca9398dd9c672d5d4230bef030e0274.tar.xz
manaplus-648c85816ca9398dd9c672d5d4230bef030e0274.zip
move "change camera mode" option into gamemodifiers.
Diffstat (limited to 'src/gui/windows/npcdialog.cpp')
-rw-r--r--src/gui/windows/npcdialog.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp
index fac7714ed..0ccae687b 100644
--- a/src/gui/windows/npcdialog.cpp
+++ b/src/gui/windows/npcdialog.cpp
@@ -26,6 +26,7 @@
#include "configuration.h"
#include "inventory.h"
#include "item.h"
+#include "settings.h"
#include "soundconsts.h"
#include "soundmanager.h"
@@ -823,7 +824,7 @@ void NpcDialog::saveCamera()
if (!viewport || mCameraMode >= 0)
return;
- mCameraMode = viewport->getCameraMode();
+ mCameraMode = settings.cameraMode;
mCameraX = viewport->getCameraRelativeX();
mCameraY = viewport->getCameraRelativeY();
}
@@ -833,15 +834,10 @@ void NpcDialog::restoreCamera()
if (!viewport || mCameraMode == -1)
return;
- if (!mCameraMode)
+ if (settings.cameraMode != mCameraMode)
+ viewport->toggleCameraMode();
+ if (mCameraMode)
{
- if (viewport->getCameraMode() != mCameraMode)
- viewport->toggleCameraMode();
- }
- else
- {
- if (viewport->getCameraMode() != mCameraMode)
- viewport->toggleCameraMode();
viewport->setCameraRelativeX(mCameraX);
viewport->setCameraRelativeY(mCameraY);
}