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
61d5963b8d
commit
f5dfe8a5e7
|
|
@ -1970,7 +1970,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 ();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1770,7 +1770,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