src/editmodes/abstractEditMode.cpp

changeset 1077
952d6b3e7d11
parent 1072
9ce9496427f2
child 1087
80e25f6b0bb0
equal deleted inserted replaced
1076:55cfa9e42d70 1077:952d6b3e7d11
163 } 163 }
164 164
165 return false; 165 return false;
166 } 166 }
167 167
168 void AbstractDrawMode::finishDraw(LDObjectList const& objs) 168 void AbstractDrawMode::finishDraw(Model& model)
169 { 169 {
170 int pos = m_window->suggestInsertPoint(); 170 int pos = m_window->suggestInsertPoint();
171 171
172 if (countof(objs) > 0) 172 if (countof(model.objects()) > 0)
173 { 173 {
174 for (LDObject* obj : objs) 174 for (LDObject* obj : model)
175 {
176 renderer()->document()->insertObject (pos++, obj); 175 renderer()->document()->insertObject (pos++, obj);
177 renderer()->compileObject (obj);
178 }
179 176
180 m_window->refresh(); 177 m_window->refresh();
181 m_window->endAction(); 178 m_window->endAction();
182 } 179 }
183 180

mercurial