Skip to content

File open dialog: better undo in the file name field

Marco Martin requested to merge work/mart/fileOpenUndoAction into master

when a file is selected in the dialog, any text that was entered by the user was lost forever and the undo stack was lost, because both QComboBox::setEditText and QLineEdit::setText discard the whole undo stack

Instead, do selectAll and then insert, so the undo stack is preserved and ctrl+Z can restore the old text entered by hand

Also, add an action in the field wired to the undo action

image

Edited by Marco Martin

Merge request reports

Loading