update editor.cpp