diff options
author | Joren De Cuyper <jorendc@libreoffice.org> | 2014-02-10 11:26:19 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-10 16:41:56 +0000 |
commit | 9c9a9708dd6115f9619cf66daa99f2470a8f9d4e (patch) | |
tree | 4b3f213a7ca82b0ef37605ffdfe3cf09b0abca82 /sfx2 | |
parent | bd37c63eff9eb4a263d43f84431cb2c32f32908b (diff) |
fdo#74782 search view doesn't hide local view when searching first time
See bug report for screenshot of current behavior.
When the search button is hit, OnTemplateSearch() is called.
If we switch from 'no search' to 'search' view, mpSearchView was not hidden.
This'll result in SearchUpdateHdl that mpCurView will not hide.
It doesn't matter if we hide it anyway (either when we would start searching,
or end searching). If we start searching, we don't have any search term yet
(so no result anyway). If we stop searching, it has to be hidden for sure.
Change-Id: I6bcf540b4866eeb6a8196c171027b385635cf084
Reviewed-on: https://gerrit.libreoffice.org/7969
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/templatedlg.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index df996fc291e4..935d62d9cf3f 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -748,6 +748,7 @@ IMPL_LINK_NOARG(SfxTemplateManagerDlg, SearchUpdateHdl) } else { + mpSearchView->deselectItems(); mpSearchView->Hide(); mpCurView->Show(); } @@ -1055,11 +1056,14 @@ void SfxTemplateManagerDlg::OnTemplateSearch () mpActionBar->SetItemState(mpActionBar->GetItemId(ACTIONBAR_SEARCH), bVisible? STATE_NOCHECK: STATE_CHECK); + // fdo#74782 We are switching views. No matter to which state, + // deselect and hide our current SearchView items. + mpSearchView->deselectItems(); + mpSearchView->Hide(); + // Hide search view if (bVisible) { - mpSearchView->deselectItems(); - mpSearchView->Hide(); mpCurView->Show(); } |