Support more percentages as parameter in ZoomCommand (related to #633)

In this way we could have a command to set zoom to 50%
This commit is contained in:
David Capello 2015-04-20 16:57:24 -03:00
parent 21c4fd51d9
commit fedf818cda

View File

@ -74,14 +74,7 @@ void ZoomCommand::onExecute(Context* context)
zoom.out();
break;
case Set:
switch (m_percentage) {
case 3200: zoom = render::Zoom(32, 1); break;
case 1600: zoom = render::Zoom(16, 1); break;
case 800: zoom = render::Zoom(8, 1); break;
case 400: zoom = render::Zoom(4, 1); break;
case 200: zoom = render::Zoom(2, 1); break;
default: zoom = render::Zoom(1, 1); break;
}
zoom = render::Zoom::fromScale(double(m_percentage) / 100.0);
break;
}