Small improvement in griddialog.cpp