Solved the problems with edit polygon dialog when expanding