fix crash on jpeg/png/tiff save

also, stop the scrollwheel changing option menus and sliders, at last
close empty mainw after load