diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-03-26 09:30:20 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-03-26 11:52:31 +0100 |
commit | 3b857c1d195003f75df6ab3633a263093e25cd91 (patch) | |
tree | 12628e4d3833bd24a088e3c54e5138af4cbeef7f /sw/source | |
parent | 5453c8b92727eebdd1edbd36cd72c7042128f610 (diff) |
sw edit bibliography entry dialog: apply after edit
Steps to reproduce the problem:
1) double-click on a bibliography entry field -> edit bibliography entry
dialog appears
2) click on "edit" button -> define bibliography entry sub-dialog
appears
3) change e.g. the URL there -> OK -> sub-dialog closes
4) click "close" -> outer dialog closes
And now the user is confused, because the field is not updated. This
works as expected if "apply" is pressed instead of "close".
This happens because the SwAuthMarkModalDlg that hosts the
SwAuthorMarkPane can be in insert or edit mode. The inner dialog just
updates in-memory state outside the doc model. This makes sense in
insert mode, so the user can fine-tune where to insert the field; but
a separate "apply" step in edit mode makes little sense.
Fix the problem by automatically applying the changed values in edit
mode.
Change-Id: I333225328d103f160f8120a2abc7a264322437a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113146
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/ui/index/swuiidxmrk.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index cb3339e3c55f..9ea9b3cf5e93 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -1296,6 +1296,13 @@ IMPL_LINK(SwAuthorMarkPane, CreateEntryHdl, weld::Button&, rButton, void) m_xAuthorFI->set_label(m_sFields[AUTH_FIELD_AUTHOR]); m_xTitleFI->set_label(m_sFields[AUTH_FIELD_TITLE]); m_xActionBT->set_sensitive(true); + + if (!bNewEntry) + { + // When in edit mode, automatically apply the changed entry to update the field in the doc + // model. + InsertHdl(*m_xActionBT); + } } IMPL_LINK_NOARG(SwAuthorMarkPane, ChangeSourceHdl, weld::ToggleButton&, void) |