keep viewport transform on undo/redo
NPE fix
recompiled
fix from Steve Northover to filter mouse events that appear as scroll gestures