mirror of
				https://github.com/cookiengineer/audacity
				synced 2025-10-31 06:03:49 +01:00 
			
		
		
		
	2092: Linux: first typed char lost when using dialog for label name
Fix: Move the insertion point to the end of the text after the dialog is shown.
This commit is contained in:
		
				
					committed by
					
						 James Crook
						James Crook
					
				
			
			
				
	
			
			
			
						parent
						
							adf243568b
						
					
				
				
					commit
					78cb554883
				
			| @@ -239,6 +239,17 @@ extern wxString AudacityMessageBoxCaptionStr() | ||||
|  | ||||
| void AudacityTextEntryDialog::SetInsertionPointEnd() | ||||
| { | ||||
|    // m_textctrl is protected member of wxTextEntryDialog | ||||
|    m_textctrl->SetInsertionPointEnd(); | ||||
|    mSetInsertionPointEnd = true; | ||||
| } | ||||
|  | ||||
| bool AudacityTextEntryDialog::Show(bool show) | ||||
| { | ||||
|    bool ret = wxTabTraversalWrapper< wxTextEntryDialog >::Show(show); | ||||
|  | ||||
|    if (show && mSetInsertionPointEnd) { | ||||
|       // m_textctrl is protected member of wxTextEntryDialog | ||||
|       m_textctrl->SetInsertionPointEnd(); | ||||
|    } | ||||
|  | ||||
|    return ret; | ||||
| } | ||||
|   | ||||
| @@ -97,6 +97,10 @@ public: | ||||
|    {} | ||||
|     | ||||
|    void SetInsertionPointEnd(); | ||||
|    bool Show(bool show = true) override; | ||||
|  | ||||
| private: | ||||
|    bool mSetInsertionPointEnd{}; | ||||
| }; | ||||
|  | ||||
| /**************************************************************************//** | ||||
|   | ||||
		Reference in New Issue
	
	Block a user