--- a/src/documentloader.cpp Sun Jan 29 15:49:36 2017 +0200 +++ b/src/documentloader.cpp Sun Jan 29 21:02:11 2017 +0200 @@ -114,7 +114,7 @@ while (line.endsWith ("\n") or line.endsWith ("\r")) line.chop (1); - LDObject* obj = ParseLine (line); + LDObject* obj = _model->addFromString(line); // Check for parse errors and warn about them if (obj->type() == OBJ_Error) @@ -122,8 +122,6 @@ print ("Couldn't parse line #%1: %2", progress() + 1, static_cast<LDError*> (obj)->reason()); ++m_warningCount; } - - _model->addObject(obj); } m_progress = i;