Ask for saving when closing tabs. Also fix some bugs.

Editor now remembers last scroll position.
When closing all tabs and open it again, palette is displayed again.
Don't pull an empty draw change when clicking on event layer.