mirror of https://github.com/KLayout/klayout.git
Ctrl+F always enters find edit box in macro editor, not only if something is selected.
This commit is contained in:
parent
1f02c2b9e9
commit
5d4fba7c51
|
|
@ -1978,7 +1978,11 @@ MacroEditorDialog::replace_all_button_clicked ()
|
|||
void
|
||||
MacroEditorDialog::search_requested (const QString &s)
|
||||
{
|
||||
searchEditBox->setText (s);
|
||||
if (! s.isNull ()) {
|
||||
searchEditBox->setText (s);
|
||||
} else {
|
||||
searchEditBox->selectAll ();
|
||||
}
|
||||
searchEditBox->setFocus ();
|
||||
search_editing ();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1788,7 +1788,11 @@ MacroEditorPage::eventFilter (QObject *watched, QEvent *event)
|
|||
QTextBlock e = mp_text->document ()->findBlock (c.selectionEnd ());
|
||||
if (e == s) {
|
||||
emit search_requested (c.selectedText ());
|
||||
} else {
|
||||
emit search_requested (QString ());
|
||||
}
|
||||
} else {
|
||||
emit search_requested (QString ());
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue