Delete duplicated code from MenuEditControl.cpp