Grid mode editing window: fix bug with appearing of unexpected window