mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 20:51:12 -06:00 
			
		
		
		
	Fixed settings list for objects
+ fixed showing of an info_manifold_warning_icon
This commit is contained in:
		
							parent
							
								
									3903ca64d7
								
							
						
					
					
						commit
						eb2b56a87f
					
				
					 5 changed files with 41 additions and 23 deletions
				
			
		|  | @ -259,6 +259,15 @@ void set_show_print_info(bool show) | |||
| void set_show_manifold_warning_icon(bool show) | ||||
| { | ||||
| 	g_show_manifold_warning_icon = show; | ||||
|     if (!g_manifold_warning_icon) | ||||
|         return; | ||||
| 
 | ||||
|     // update manifold_warning_icon showing
 | ||||
|     if (show && !g_info_sizer->IsShown(static_cast<size_t>(0))) | ||||
|         g_show_manifold_warning_icon = false; | ||||
| 
 | ||||
|     g_manifold_warning_icon->Show(g_show_manifold_warning_icon); | ||||
|     g_manifold_warning_icon->GetParent()->Layout(); | ||||
| } | ||||
| 
 | ||||
| void set_objects_list_sizer(wxBoxSizer *objects_list_sizer){ | ||||
|  | @ -1118,11 +1127,11 @@ void show_buttons(bool show) | |||
| 	} | ||||
| } | ||||
| 
 | ||||
| void show_info_sizer(const bool show, const bool is_update_settings/* = false*/) | ||||
| void show_info_sizer(const bool show) | ||||
| { | ||||
| 	g_info_sizer->Show(static_cast<size_t>(0), show);  | ||||
| 	g_info_sizer->Show(1, show && g_show_print_info); | ||||
| 	g_manifold_warning_icon->Show(show && (!is_update_settings && g_show_manifold_warning_icon)); | ||||
| 	g_manifold_warning_icon->Show(show && g_show_manifold_warning_icon); | ||||
| } | ||||
| 
 | ||||
| void show_object_name(bool show) | ||||
|  | @ -1142,6 +1151,7 @@ void update_mode() | |||
| 	show_info_sizer(mode == ConfigMenuModeExpert); | ||||
| 	show_buttons(mode == ConfigMenuModeExpert); | ||||
|     show_object_name(mode == ConfigMenuModeSimple); | ||||
|     show_manipulation_sizer(mode == ConfigMenuModeSimple); | ||||
| 
 | ||||
| 	// TODO There is a not the best place of it!
 | ||||
| 	// *** Update showing of the collpane_settings
 | ||||
|  |  | |||
|  | @ -182,7 +182,7 @@ bool select_language(wxArrayString & names, wxArrayLong & identifiers); | |||
| // update right panel of the Plater according to view mode
 | ||||
| void update_mode(); | ||||
| 
 | ||||
| void show_info_sizer(const bool show, const bool is_update_settinfs = false); | ||||
| void show_info_sizer(const bool show); | ||||
| 
 | ||||
| std::vector<Tab *>& get_tabs_list(); | ||||
| bool checked_tab(Tab* tab); | ||||
|  |  | |||
|  | @ -731,11 +731,8 @@ void select_current_object(int idx) | |||
| { | ||||
| 	g_prevent_list_events = true; | ||||
| 	m_objects_ctrl->UnselectAll(); | ||||
| 	if (idx < 0) { | ||||
| 		g_prevent_list_events = false; | ||||
| 		return; | ||||
| 	} | ||||
| 	m_objects_ctrl->Select(m_objects_model->GetItemById(idx)); | ||||
|     if (idx>=0) | ||||
|         m_objects_ctrl->Select(m_objects_model->GetItemById(idx)); | ||||
| 	part_selection_changed(); | ||||
| 	g_prevent_list_events = false; | ||||
| } | ||||
|  | @ -748,12 +745,8 @@ void select_current_volume(int idx, int vol_idx) | |||
|     } | ||||
|     g_prevent_list_events = true; | ||||
|     m_objects_ctrl->UnselectAll(); | ||||
|     if (idx < 0) { | ||||
|         g_prevent_list_events = false; | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|     m_objects_ctrl->Select(m_objects_model->GetItemByVolumeId(idx, vol_idx)); | ||||
|     if (idx >= 0) | ||||
|         m_objects_ctrl->Select(m_objects_model->GetItemByVolumeId(idx, vol_idx)); | ||||
|     part_selection_changed(); | ||||
|     g_prevent_list_events = false; | ||||
| } | ||||
|  | @ -1186,8 +1179,8 @@ wxMenu *create_add_settings_popupmenu(bool is_part) | |||
| 		menu->Append(menu_item); | ||||
| 	} | ||||
| #ifndef __WXMSW__ | ||||
| 	menu->Bind(wxEVT_MENU, [menu](wxEvent &event) { | ||||
| 		get_settings_choice(menu, event.GetId(), true); | ||||
|     menu->Bind(wxEVT_MENU, [menu,is_part](wxEvent &event) { | ||||
|         get_settings_choice(menu, event.GetId(), is_part); | ||||
| 	}); | ||||
| #endif //no __WXMSW__
 | ||||
| 	return menu; | ||||
|  | @ -2027,5 +2020,17 @@ void update_double_slider_from_canvas(wxKeyEvent& event) | |||
|         event.Skip(); | ||||
| } | ||||
| 
 | ||||
| void show_manipulation_sizer(const bool is_simple_mode) | ||||
| { | ||||
|     auto item = m_objects_ctrl->GetSelection(); | ||||
|     if (!item || !is_simple_mode) | ||||
|         return; | ||||
| 
 | ||||
|     if (m_objects_model->IsSettingsItem(item)) { | ||||
|         m_objects_ctrl->Select(m_objects_model->GetParent(item)); | ||||
|         part_selection_changed(); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| } //namespace GUI
 | ||||
| } //namespace Slic3r 
 | ||||
|  | @ -140,6 +140,8 @@ void reset_double_slider(); | |||
| // update DoubleSlider after keyDown in canvas
 | ||||
| void update_double_slider_from_canvas(wxKeyEvent& event); | ||||
| 
 | ||||
| void show_manipulation_sizer(const bool is_simple_mode); | ||||
| 
 | ||||
| } //namespace GUI
 | ||||
| } //namespace Slic3r 
 | ||||
| #endif  //slic3r_GUI_ObjectParts_hpp_
 | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 YuSanka
						YuSanka