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 |