Fixed tool camera not reverting back to previous camera mode

This commit is contained in:
Michaël Lemaire 2015-09-21 23:17:47 +02:00
parent 8a9c3d4b83
commit 273585dd8a
3 changed files with 7 additions and 2 deletions

1
TODO
View file

@ -6,7 +6,6 @@ Technlology Preview 2 :
- Fix potential holes in land rendering (OpenGL and software).
- Fix polygon culling near the camera in low-res renders (automatic tessellation ?).
- Fix sun size not being consistent between opengl and software
- Fix tool camera not reverting to previous camera
Technology Preview 3 :
- Alter aerial perspective using estimation of the amount of light left after cloud layers traversal.

View file

@ -15,6 +15,7 @@ ModelerCameras::ModelerCameras(MainModelerWindow *parent):
topdown = new CameraDefinition();
current = new CameraDefinition();
tool = new CameraDefinition();
previous = render;
active = render;
tool_mode = TOOL_NONE;
@ -63,6 +64,8 @@ void ModelerCameras::processPanning(double xvalue, double yvalue)
void ModelerCameras::startSunTool()
{
tool_mode = TOOL_SUN;
previous = active;
current->copy(tool);
active = tool;
@ -71,7 +74,7 @@ void ModelerCameras::startSunTool()
void ModelerCameras::endTool()
{
active = render;
active = previous;
tool_mode = TOOL_NONE;
validate();
@ -124,6 +127,8 @@ void ModelerCameras::changeActiveCamera(const QString &name)
active = topdown;
}
previous = active;
}
void ModelerCameras::toolChanged(const QString &tool)

View file

@ -66,6 +66,7 @@ private:
CameraDefinition *render;
CameraDefinition *topdown;
CameraDefinition *tool;
CameraDefinition *previous;
typedef enum
{