mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	Fixed position of instances after paste object
This commit is contained in:
		
							parent
							
								
									7bb79062e6
								
							
						
					
					
						commit
						0132313ee0
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		|  | @ -1863,7 +1863,12 @@ void Selection::paste_objects_from_clipboard() | |||
|     { | ||||
|         ModelObject* dst_object = m_model->add_object(*src_object); | ||||
|         double offset = wxGetApp().plater()->canvas3D()->get_size_proportional_to_max_bed_size(0.05); | ||||
|         dst_object->translate(offset, offset, 0.0); | ||||
|         Vec3d displacement(offset, offset, 0.0); | ||||
|         for (ModelInstance* inst : dst_object->instances) | ||||
|         { | ||||
|             inst->set_offset(inst->get_offset() + displacement); | ||||
|         } | ||||
| 
 | ||||
|         object_idxs.push_back(m_model->objects.size() - 1); | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Enrico Turri
						Enrico Turri