Make Enter key to "Agree" loading the animation sequence when we modify the duration field

master
David Capello 2022-08-31 09:11:13 -03:00
parent c67902dee3
commit 6da4000e6c
1 changed files with 9 additions and 1 deletions

View File

@ -387,7 +387,15 @@ FileOp* FileOp::createLoadDocumentOperation(Context* context,
window.duration()->setTextf("%d", fop->m_seq.duration);
window.duration()->Change.connect(
[&]() { fop->m_seq.duration = window.duration()->textInt(); });
[&]() {
fop->m_seq.duration = window.duration()->textInt();
// If the animation duration is changed we'll prefer to
// agree on loading the sequence if the user press Enter.
//
// TODO maybe the "Agree" button should be the default
// focus magnet in this dialog
window.agree()->setFocusMagnet(true);
});
window.openWindowInForeground();