mirror of https://github.com/KLayout/klayout.git
Macro IDE: Ctrl+F does not enter whole selection into find edit box - just if that's a part of a line and not empty
This commit is contained in:
parent
2337149eb5
commit
a4039a1bf8
|
|
@ -1720,7 +1720,13 @@ MacroEditorPage::eventFilter (QObject *watched, QEvent *event)
|
||||||
} else if (is_find_key (ke)) {
|
} else if (is_find_key (ke)) {
|
||||||
|
|
||||||
QTextCursor c = mp_text->textCursor ();
|
QTextCursor c = mp_text->textCursor ();
|
||||||
emit search_requested (c.selectedText ());
|
if (c.selectionStart () != c.selectionEnd ()) {
|
||||||
|
QTextBlock s = mp_text->document ()->findBlock (c.selectionStart ());
|
||||||
|
QTextBlock e = mp_text->document ()->findBlock (c.selectionEnd ());
|
||||||
|
if (e == s) {
|
||||||
|
emit search_requested (c.selectedText ());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue