Fixed bug where the edit button didn't show the pattern unless the window was visible