mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 12:11:15 -06:00 
			
		
		
		
	Fixed a bug, where std::string and wxString were mixed up.
This commit is contained in:
		
							parent
							
								
									ebb7981d16
								
							
						
					
					
						commit
						5084d544a2
					
				
					 2 changed files with 11 additions and 8 deletions
				
			
		|  | @ -301,8 +301,8 @@ void ObjectManipulation::update_if_dirty() | |||
|     if (!m_dirty) | ||||
|         return; | ||||
| 
 | ||||
|     auto update_label = [](std::string &label_cache, const std::string &new_label, wxStaticText *widget) { | ||||
|         std::string new_label_localized = _(new_label) + ":"; | ||||
|     auto update_label = [](wxString &label_cache, const std::string &new_label, wxStaticText *widget) { | ||||
|         wxString new_label_localized = _(new_label) + ":"; | ||||
|         if (label_cache != new_label_localized) { | ||||
|             label_cache = new_label_localized; | ||||
|             widget->SetLabel(new_label_localized); | ||||
|  | @ -420,6 +420,8 @@ void ObjectManipulation::change_rotation_value(int axis, double value) | |||
| 		transformation_type.set_local(); | ||||
| 	} | ||||
| 
 | ||||
|     //FIXME if anisotropic scaling is required, and is_single_full_instance && m_world_coordinates, apply 90 degrees rotation of the rotation vector.
 | ||||
| 
 | ||||
|     selection.start_dragging(); | ||||
| 	selection.rotate( | ||||
| 		(M_PI / 180.0) * (transformation_type.absolute() ? rotation : rotation - m_cache.rotation),  | ||||
|  | @ -490,6 +492,7 @@ void ObjectManipulation::do_scale(const Vec3d &scale) const | |||
|     TransformationType transformation_type(TransformationType::World_Relative_Joint); | ||||
|     if (selection.is_single_full_instance() && ! m_world_coordinates) | ||||
|         transformation_type.set_local(); | ||||
|     //FIXME if anisotropic scaling is required, and is_single_full_instance && m_world_coordinates, apply 90 degrees rotation of the scaling vector.
 | ||||
|     selection.start_dragging(); | ||||
|     selection.scale(scaling_factor * 0.01, transformation_type); | ||||
|     wxGetApp().plater()->canvas3D()->do_scale(); | ||||
|  |  | |||
|  | @ -28,9 +28,9 @@ class ObjectManipulation : public OG_Settings | |||
|         Vec3d size; | ||||
|         Vec3d size_rounded; | ||||
| 
 | ||||
|         std::string move_label_string; | ||||
|         std::string rotate_label_string; | ||||
|         std::string scale_label_string; | ||||
|         wxString move_label_string; | ||||
|         wxString rotate_label_string; | ||||
|         wxString scale_label_string; | ||||
| 
 | ||||
|         struct Instance | ||||
|         { | ||||
|  | @ -55,9 +55,9 @@ class ObjectManipulation : public OG_Settings | |||
|             rotation = rotation_rounded = Vec3d(DBL_MAX, DBL_MAX, DBL_MAX); | ||||
|             scale = scale_rounded = Vec3d(DBL_MAX, DBL_MAX, DBL_MAX); | ||||
|             size = size_rounded = Vec3d(DBL_MAX, DBL_MAX, DBL_MAX); | ||||
|             move_label_string = ""; | ||||
|             rotate_label_string = ""; | ||||
|             scale_label_string = ""; | ||||
|             move_label_string = wxString(); | ||||
|             rotate_label_string = wxString(); | ||||
|             scale_label_string = wxString(); | ||||
|             instance.reset(); | ||||
|         } | ||||
|         bool is_valid() const { return position != Vec3d(DBL_MAX, DBL_MAX, DBL_MAX); } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 bubnikv
						bubnikv