mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 12:41:20 -06:00 
			
		
		
		
	FIX:show msgdialog when user selected timelapse_no_toolhead first time
Change-Id: I08307aae17ccc93ae4448016504f68ab9e67558b (cherry picked from commit 41a9cd933b6c98b7b2fbeea3b3863e3bce56e27a)
This commit is contained in:
		
							parent
							
								
									252aa91ae7
								
							
						
					
					
						commit
						ae45af1688
					
				
					 4 changed files with 19 additions and 13 deletions
				
			
		|  | @ -291,17 +291,6 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con | |||
|         is_msg_dlg_already_exist = false; | ||||
|     } | ||||
| 
 | ||||
|     //BBS
 | ||||
|     if (config->opt_bool("timelapse_no_toolhead") && !is_timelapse_wipe_tower_already_prompted) { | ||||
|         wxString msg_text = _(L("When recording timelapse without toolhead, it is recommended to add a \"Timelapse Wipe Tower\" \n" | ||||
|                                 "by right-click the empty position of build plate and choose \"Add Primitive\"->\"Timelapse Wipe Tower\".\n")); | ||||
|         MessageDialog dialog(m_msg_dlg_parent, msg_text, "", wxICON_WARNING | wxOK); | ||||
|         is_msg_dlg_already_exist = true; | ||||
|         dialog.ShowModal(); | ||||
|         is_msg_dlg_already_exist = false; | ||||
|         is_timelapse_wipe_tower_already_prompted = true; | ||||
|     } | ||||
| 
 | ||||
|     // BBS
 | ||||
|     int filament_cnt = wxGetApp().preset_bundle->filament_presets.size(); | ||||
| #if 0 | ||||
|  |  | |||
|  | @ -21,7 +21,6 @@ namespace GUI { | |||
| class ConfigManipulation | ||||
| { | ||||
|     bool                is_msg_dlg_already_exist{ false }; | ||||
|     bool                is_timelapse_wipe_tower_already_prompted{false}; // BBS
 | ||||
|     bool                m_is_initialized_support_material_overhangs_queried{ false }; | ||||
|     bool                m_support_material_overhangs_queried{ false }; | ||||
| 
 | ||||
|  |  | |||
|  | @ -1374,6 +1374,12 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value) | |||
|     if (opt_key == "enable_prime_tower" || opt_key == "single_extruder_multi_material" || opt_key == "extruders_count" ) | ||||
|         update_wiping_button_visibility(); | ||||
| 
 | ||||
|     //popup message dialog when first selected
 | ||||
|     if (opt_key == "timelapse_no_toolhead" && boost::any_cast<bool>(value)) | ||||
|         show_timelapse_warning_dialog(); | ||||
|      | ||||
| 
 | ||||
| 
 | ||||
|     // BBS
 | ||||
| #if 0 | ||||
|     if (opt_key == "extruders_count") | ||||
|  | @ -1391,6 +1397,16 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value) | |||
|     m_page_view->GetParent()->Layout(); | ||||
| } | ||||
| 
 | ||||
| void Tab::show_timelapse_warning_dialog() { | ||||
|     if (!m_is_timelapse_wipe_tower_already_prompted) { | ||||
|         wxString      msg_text = _(L("When recording timelapse without toolhead, it is recommended to add a \"Timelapse Wipe Tower\" \n" | ||||
|                                 "by right-click the empty position of build plate and choose \"Add Primitive\"->\"Timelapse Wipe Tower\".\n")); | ||||
|         MessageDialog dialog(nullptr, msg_text, "", wxICON_WARNING | wxOK); | ||||
|         dialog.ShowModal(); | ||||
|         m_is_timelapse_wipe_tower_already_prompted = true; | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| // Show/hide the 'purging volumes' button
 | ||||
| void Tab::update_wiping_button_visibility() { | ||||
|     if (m_preset_bundle->printers.get_selected_preset().printer_technology() == ptSLA) | ||||
|  | @ -1503,7 +1519,6 @@ void Tab::apply_config_from_cache() | |||
|     BOOST_LOG_TRIVIAL(info) << __FUNCTION__<<boost::format(": exit, was_applied=%1%")%was_applied; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| // Call a callback to update the selection of presets on the plater:
 | ||||
| // To update the content of the selection boxes,
 | ||||
| // to update the filament colors of the selection boxes,
 | ||||
|  |  | |||
|  | @ -272,6 +272,8 @@ protected: | |||
| 	bool				m_page_switch_running = false; | ||||
| 	bool				m_page_switch_planned = false; | ||||
| 
 | ||||
|     bool				m_is_timelapse_wipe_tower_already_prompted = false; | ||||
| 
 | ||||
| public: | ||||
| 	PresetBundle*		m_preset_bundle; | ||||
| 	bool				m_show_btn_incompatible_presets = false; | ||||
|  | @ -389,6 +391,7 @@ public: | |||
|     void			apply_searcher(); | ||||
| 	void			cache_config_diff(const std::vector<std::string>& selected_options); | ||||
| 	void			apply_config_from_cache(); | ||||
|     void            show_timelapse_warning_dialog(); | ||||
| 
 | ||||
| 	const std::map<wxString, std::string>& get_category_icon_map() { return m_category_icon; } | ||||
| 	//BBS: GUI refactor
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tao Wang
						Tao Wang