More organized edit popup closing (win)
Close edit popup when main window is closed (win), closes #691