Fix dialog saving size regression. Close #1867.