mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 12:41:20 -06:00 
			
		
		
		
	Merge branch 'master' of https://github.com/prusa3d/Slic3r into scene_manipulators
This commit is contained in:
		
						commit
						3febf1dffb
					
				
					 2 changed files with 13 additions and 1 deletions
				
			
		|  | @ -56,6 +56,7 @@ | ||||||
| 
 | 
 | ||||||
| #include "../Utils/PresetUpdater.hpp" | #include "../Utils/PresetUpdater.hpp" | ||||||
| #include "../Config/Snapshot.hpp" | #include "../Config/Snapshot.hpp" | ||||||
|  | #include "3DScene.hpp" | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| namespace Slic3r { namespace GUI { | namespace Slic3r { namespace GUI { | ||||||
|  | @ -378,6 +379,7 @@ void add_config_menu(wxMenuBar *menu, int event_preferences_changed, int event_l | ||||||
| 				save_language(); | 				save_language(); | ||||||
| 				show_info(g_wxTabPanel, _(L("Application will be restarted")), _(L("Attention!"))); | 				show_info(g_wxTabPanel, _(L("Application will be restarted")), _(L("Attention!"))); | ||||||
| 				if (event_language_change > 0) { | 				if (event_language_change > 0) { | ||||||
|  | 					_3DScene::remove_all_canvases();// remove all canvas before recreate GUI
 | ||||||
| 					wxCommandEvent event(event_language_change); | 					wxCommandEvent event(event_language_change); | ||||||
| 					g_wxApp->ProcessEvent(event); | 					g_wxApp->ProcessEvent(event); | ||||||
| 				} | 				} | ||||||
|  |  | ||||||
|  | @ -2619,14 +2619,24 @@ void SavePresetWindow::accept() | ||||||
| 	if (!m_chosen_name.empty()) { | 	if (!m_chosen_name.empty()) { | ||||||
| 		const char* unusable_symbols = "<>:/\\|?*\""; | 		const char* unusable_symbols = "<>:/\\|?*\""; | ||||||
| 		bool is_unusable_symbol = false; | 		bool is_unusable_symbol = false; | ||||||
|  | 		bool is_unusable_postfix = false; | ||||||
|  | 		const std::string unusable_postfix = "(modified)"; | ||||||
| 		for (size_t i = 0; i < std::strlen(unusable_symbols); i++){ | 		for (size_t i = 0; i < std::strlen(unusable_symbols); i++){ | ||||||
| 			if (m_chosen_name.find_first_of(unusable_symbols[i]) != std::string::npos){ | 			if (m_chosen_name.find_first_of(unusable_symbols[i]) != std::string::npos){ | ||||||
| 				is_unusable_symbol = true; | 				is_unusable_symbol = true; | ||||||
| 				break; | 				break; | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
|  | 		if (m_chosen_name.find(unusable_postfix) != std::string::npos) | ||||||
|  | 			is_unusable_postfix = true; | ||||||
|  | 
 | ||||||
| 		if (is_unusable_symbol) { | 		if (is_unusable_symbol) { | ||||||
| 			show_error(this, _(L("The supplied name is not valid; the following characters are not allowed:"))+" <>:/\\|?*\""); | 			show_error(this,_(L("The supplied name is not valid;")) + "\n" + | ||||||
|  | 							_(L("the following characters are not allowed:")) + " <>:/\\|?*\""); | ||||||
|  | 		} | ||||||
|  | 		else if (is_unusable_postfix){ | ||||||
|  | 			show_error(this,	_(L("The supplied name is not valid;")) + "\n" +  | ||||||
|  | 								_(L("the following postfix are not allowed:")) + "\n\t" + unusable_postfix); | ||||||
| 		} | 		} | ||||||
| 		else if (m_chosen_name.compare("- default -") == 0) { | 		else if (m_chosen_name.compare("- default -") == 0) { | ||||||
| 			show_error(this, _(L("The supplied name is not available."))); | 			show_error(this, _(L("The supplied name is not available."))); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Enrico Turri
						Enrico Turri