summaryrefslogtreecommitdiff
path: root/svtools/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-12-09 17:28:00 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-12-09 20:23:06 +0100
commit5454d9fc5ed40ed43a8b961b5cb39571ab9df584 (patch)
tree053e3251f813353589b4e49443ced35aa9de3949 /svtools/source
parenta51e981a1dbf51a25def24d306e075eeeefecba8 (diff)
tdf#138778 add has_child_focus which considers a related popup a 'child'
Change-Id: Iab23e399f2650ece702fb1f62d1387acca472b42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107499 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools/source')
-rw-r--r--svtools/source/control/tabbar.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index d44dd06d86c0..1beda5faeff6 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -395,8 +395,9 @@ IMPL_LINK( TabBarEdit, ImplEndEditHdl, void*, pCancel, void )
ResetPostEvent();
maLoseFocusIdle.Stop();
- // do it idle in case we quickly regain focus
- if (!m_xEntry->has_focus())
+ // We need this query, because the edit gets a losefocus event,
+ // when it shows the context menu or the insert symbol dialog
+ if (!m_xEntry->has_focus() && m_xEntry->has_child_focus())
maLoseFocusIdle.Start();
else
GetParent()->EndEditMode( pCancel != nullptr );
@@ -406,7 +407,13 @@ IMPL_LINK_NOARG(TabBarEdit, ImplEndTimerHdl, Timer *, void)
{
if (m_xEntry->has_focus())
return;
- GetParent()->EndEditMode( true );
+
+ // We need this query, because the edit gets a losefocus event,
+ // when it shows the context menu or the insert symbol dialog
+ if (m_xEntry->has_child_focus())
+ maLoseFocusIdle.Start();
+ else
+ GetParent()->EndEditMode( true );
}
namespace {