+ // This is not centering for some reason. Need to figure out why. :-/
+ if (event->delta() > 0)
+ {
+ Vector newOrigin = center - ((center - Painter::origin) / zoomFactor);
+ Painter::origin = newOrigin;
+ Painter::zoom *= zoomFactor;
+ }
+ else
+ {
+ Vector newOrigin = center + ((-center + Painter::origin) * zoomFactor);
+ Painter::origin = newOrigin;
+ Painter::zoom /= zoomFactor;