mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 12:41:20 -06:00 
			
		
		
		
	1) Added Scale to print volume menu item to objects list context menu
2) Disable [F] key when scale sizmo is dragging
This commit is contained in:
		
							parent
							
								
									c92940c985
								
							
						
					
					
						commit
						734d946912
					
				
					 4 changed files with 19 additions and 3 deletions
				
			
		|  | @ -1,3 +1,4 @@ | |||
| #include "libslic3r/libslic3r.h" | ||||
| #include "GUI_ObjectList.hpp" | ||||
| #include "GUI_ObjectManipulation.hpp" | ||||
| #include "GUI_App.hpp" | ||||
|  | @ -1283,6 +1284,14 @@ void ObjectList::append_menu_item_delete(wxMenu* menu) | |||
|         [this](wxCommandEvent&) { remove(); }, "", menu); | ||||
| } | ||||
| 
 | ||||
| #if ENABLE_SCALE_TO_FIT_PRINT_VOLUME | ||||
| void ObjectList::append_menu_item_scale_selection_to_fit_print_volume(wxMenu* menu) | ||||
| { | ||||
|     append_menu_item(menu, wxID_ANY, _(L("Scale to print volume")), _(L("Scale the selected object to fit the print volume")), | ||||
|         [this](wxCommandEvent&) { wxGetApp().plater()->scale_selection_to_fit_print_volume(); }, "", menu); | ||||
| } | ||||
| #endif // ENABLE_SCALE_TO_FIT_PRINT_VOLUME
 | ||||
| 
 | ||||
| void ObjectList::create_object_popupmenu(wxMenu *menu) | ||||
| { | ||||
| #ifdef __WXOSX__   | ||||
|  | @ -1291,6 +1300,9 @@ void ObjectList::create_object_popupmenu(wxMenu *menu) | |||
| 
 | ||||
|     append_menu_item_export_stl(menu); | ||||
|     append_menu_item_fix_through_netfabb(menu); | ||||
| #if ENABLE_SCALE_TO_FIT_PRINT_VOLUME | ||||
|     append_menu_item_scale_selection_to_fit_print_volume(menu); | ||||
| #endif // ENABLE_SCALE_TO_FIT_PRINT_VOLUME
 | ||||
| 
 | ||||
|     // Split object to parts
 | ||||
|     m_menu_item_split = append_menu_item_split(menu); | ||||
|  |  | |||
|  | @ -207,6 +207,9 @@ public: | |||
|     void                append_menu_item_export_stl(wxMenu* menu) const ; | ||||
|     void                append_menu_item_change_extruder(wxMenu* menu) const; | ||||
|     void                append_menu_item_delete(wxMenu* menu); | ||||
| #if ENABLE_SCALE_TO_FIT_PRINT_VOLUME | ||||
|     void                append_menu_item_scale_selection_to_fit_print_volume(wxMenu* menu); | ||||
| #endif // ENABLE_SCALE_TO_FIT_PRINT_VOLUME
 | ||||
|     void                create_object_popupmenu(wxMenu *menu); | ||||
|     void                create_sla_object_popupmenu(wxMenu*menu); | ||||
|     void                create_part_popupmenu(wxMenu*menu); | ||||
|  |  | |||
|  | @ -853,7 +853,9 @@ bool GLGizmosManager::on_char(wxKeyEvent& evt, GLCanvas3D& canvas) | |||
|         { | ||||
|             if (m_current == Scale) | ||||
|             { | ||||
|                 wxGetApp().plater()->scale_selection_to_fit_print_volume(); | ||||
|                 if (!is_dragging()) | ||||
|                     wxGetApp().plater()->scale_selection_to_fit_print_volume(); | ||||
| 
 | ||||
|                 processed = true; | ||||
|             } | ||||
| 
 | ||||
|  |  | |||
|  | @ -3037,8 +3037,7 @@ bool Plater::priv::init_common_menu(wxMenu* menu, const bool is_part/* = false*/ | |||
|     sidebar->obj_list()->append_menu_item_fix_through_netfabb(menu); | ||||
| 
 | ||||
| #if ENABLE_SCALE_TO_FIT_PRINT_VOLUME | ||||
|     append_menu_item(menu, wxID_ANY, _(L("Scale to print volume")), _(L("Scale the selected object to fit the print volume")), | ||||
|         [this](wxCommandEvent&) { scale_selection_to_fit_print_volume(); }, "", menu); | ||||
|     sidebar->obj_list()->append_menu_item_scale_selection_to_fit_print_volume(menu); | ||||
| #endif // ENABLE_SCALE_TO_FIT_PRINT_VOLUME
 | ||||
| 
 | ||||
|     wxMenu* mirror_menu = new wxMenu(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Enrico Turri
						Enrico Turri