fixes #790

Added the check for button enabled or not for editing in read-only mode.