forked from qt-creator/qt-creator
Make Enter Find String enabled regardless of Find
Previously Enter Find String (Ctrl+E) required opening Find toolbar at least once, which is minor but noticeable annoyance. With this change it always opens Find without focus, so it lines up with Find Next Selected behavior and also with default Mac behavior. It does also show yellow highlight for all occurrences without moving cursor. Task-number: QTCREATORBUG-8993 Change-Id: I1eb8f151d5482895cc49fa5281e7d4e66cf31545 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
committed by
Eike Ziller
parent
0369e2a114
commit
54bed74549
@@ -353,6 +353,8 @@ void FindToolBar::updateFindAction()
|
||||
m_findInDocumentAction->setEnabled(enabled);
|
||||
m_findNextSelectedAction->setEnabled(enabled);
|
||||
m_findPreviousSelectedAction->setEnabled(enabled);
|
||||
if (QApplication::clipboard()->supportsFindBuffer())
|
||||
m_enterFindStringAction->setEnabled(enabled);
|
||||
}
|
||||
|
||||
void FindToolBar::updateToolBar()
|
||||
@@ -371,8 +373,6 @@ void FindToolBar::updateToolBar()
|
||||
m_wholeWordAction->setEnabled(enabled);
|
||||
m_regularExpressionAction->setEnabled(enabled);
|
||||
m_preserveCaseAction->setEnabled(replaceEnabled && !hasFindFlag(FindRegularExpression));
|
||||
if (QApplication::clipboard()->supportsFindBuffer())
|
||||
m_enterFindStringAction->setEnabled(enabled);
|
||||
bool replaceFocus = m_ui.replaceEdit->hasFocus();
|
||||
m_ui.findEdit->setEnabled(enabled);
|
||||
m_ui.findLabel->setEnabled(enabled);
|
||||
@@ -529,6 +529,7 @@ void FindToolBar::invokeResetIncrementalSearch()
|
||||
|
||||
void FindToolBar::putSelectionToFindClipboard()
|
||||
{
|
||||
openFind(false);
|
||||
const QString text = m_currentDocumentFind->currentFindString();
|
||||
QApplication::clipboard()->setText(text, QClipboard::FindBuffer);
|
||||
setFindText(text);
|
||||
|
||||
Reference in New Issue
Block a user