forked from qt-creator/qt-creator
Find: Fix that pressing escape when tool bar is disabled did nothing
Change-Id: Ic8f3c897aa77bff2d1bb393186634418ff0d8d80 Task-number: QTCREATORBUG-12710 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -348,8 +348,6 @@ void FindToolBar::updateToolBar()
|
||||
bool replaceEnabled = enabled && m_currentDocumentFind->supportsReplace();
|
||||
bool showAllControls = canShowAllControls(replaceEnabled);
|
||||
|
||||
m_goToCurrentFindAction->setEnabled(enabled);
|
||||
|
||||
m_findNextAction->setEnabled(enabled);
|
||||
m_findPreviousAction->setEnabled(enabled);
|
||||
|
||||
@@ -618,9 +616,11 @@ void FindToolBar::updateFlagMenus()
|
||||
m_preserveCaseAction->setEnabled((supportedFlags & FindPreserveCase) && !regexp && replaceEnabled);
|
||||
}
|
||||
|
||||
bool FindToolBar::setFocusToCurrentFindSupport()
|
||||
void FindToolBar::setFocusToCurrentFindSupport()
|
||||
{
|
||||
return m_currentDocumentFind->setFocusToCurrentFindSupport();
|
||||
if (!m_currentDocumentFind->setFocusToCurrentFindSupport())
|
||||
if (QWidget *w = focusWidget())
|
||||
w->clearFocus();
|
||||
}
|
||||
|
||||
void FindToolBar::hideAndResetFocus()
|
||||
|
||||
@@ -119,7 +119,7 @@ private slots:
|
||||
|
||||
void adaptToCandidate();
|
||||
|
||||
bool setFocusToCurrentFindSupport();
|
||||
void setFocusToCurrentFindSupport();
|
||||
|
||||
protected:
|
||||
bool focusNextPrevChild(bool next);
|
||||
|
||||
Reference in New Issue
Block a user