Update the shown file name in wxGTK wxFilePickerCtrl::SetPath()
This still doesn't work if the file doesn't exist, but at least shows the correct file name if it does exist, which is better than nothing and the best we can reasonably do when using the native control. Closes #19163.
This commit is contained in:
@@ -135,7 +135,9 @@ void wxFileButton::SetPath(const wxString &str)
|
||||
{
|
||||
m_path = str;
|
||||
|
||||
if (m_dialog)
|
||||
if (GTK_IS_FILE_CHOOSER(m_widget))
|
||||
gtk_file_chooser_set_filename((GtkFileChooser*)m_widget, str.utf8_str());
|
||||
else if (m_dialog)
|
||||
UpdateDialogPath(m_dialog);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user