Don't refresh in edit mode

Also hide the refresh menu in edit mode.

Fixed issue #248