mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	Added tooltip to filename fields for custom texture and model into bed shape dialog to show the full path of the file
This commit is contained in:
		
							parent
							
								
									e86d40fe98
								
							
						
					
					
						commit
						d27d3257f7
					
				
					 1 changed files with 16 additions and 0 deletions
				
			
		|  | @ -208,6 +208,14 @@ wxPanel* BedShapePanel::init_texture_panel() | |||
|         filename_lbl->Bind(wxEVT_UPDATE_UI, ([this](wxUpdateUIEvent& e) | ||||
|             { | ||||
|                 e.SetText(_(boost::filesystem::path(m_custom_texture).filename().string())); | ||||
|                 wxStaticText* lbl = dynamic_cast<wxStaticText*>(e.GetEventObject()); | ||||
|                 if (lbl != nullptr) | ||||
|                 { | ||||
|                     wxString tooltip_text = (m_custom_texture == NONE) ? _(L("")) : _(m_custom_texture); | ||||
|                     wxToolTip* tooltip = lbl->GetToolTip(); | ||||
|                     if ((tooltip == nullptr) || (tooltip->GetTip() != tooltip_text)) | ||||
|                         lbl->SetToolTip(tooltip_text); | ||||
|                 } | ||||
|             })); | ||||
| 
 | ||||
|         remove_btn->Bind(wxEVT_UPDATE_UI, ([this](wxUpdateUIEvent& e) | ||||
|  | @ -268,6 +276,14 @@ wxPanel* BedShapePanel::init_model_panel() | |||
|         filename_lbl->Bind(wxEVT_UPDATE_UI, ([this](wxUpdateUIEvent& e) | ||||
|             { | ||||
|                 e.SetText(_(boost::filesystem::path(m_custom_model).filename().string())); | ||||
|                 wxStaticText* lbl = dynamic_cast<wxStaticText*>(e.GetEventObject()); | ||||
|                 if (lbl != nullptr) | ||||
|                 { | ||||
|                     wxString tooltip_text = (m_custom_model == NONE) ? _(L("")) : _(m_custom_model); | ||||
|                     wxToolTip* tooltip = lbl->GetToolTip(); | ||||
|                     if ((tooltip == nullptr) || (tooltip->GetTip() != tooltip_text)) | ||||
|                         lbl->SetToolTip(tooltip_text); | ||||
|                 } | ||||
|             })); | ||||
| 
 | ||||
|         remove_btn->Bind(wxEVT_UPDATE_UI, ([this](wxUpdateUIEvent& e) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Enrico Turri
						Enrico Turri