mirror of https://github.com/KLayout/klayout.git
Qt4 compatibility, some enhancement of macro IDE completer
This commit is contained in:
parent
fea33b284e
commit
835133854c
|
|
@ -510,7 +510,7 @@ MacroEditorPage::MacroEditorPage (QWidget * /*parent*/, MacroEditorHighlighters
|
||||||
|
|
||||||
mp_text->installEventFilter (this);
|
mp_text->installEventFilter (this);
|
||||||
|
|
||||||
mp_completer_popup = new QWidget (window (), Qt::ToolTip | Qt::WindowDoesNotAcceptFocus | Qt::WindowTransparentForInput);
|
mp_completer_popup = new QWidget (window (), Qt::ToolTip);
|
||||||
mp_completer_popup->setWindowModality (Qt::NonModal);
|
mp_completer_popup->setWindowModality (Qt::NonModal);
|
||||||
QHBoxLayout *ly = new QHBoxLayout (mp_completer_popup);
|
QHBoxLayout *ly = new QHBoxLayout (mp_completer_popup);
|
||||||
ly->setMargin (0);
|
ly->setMargin (0);
|
||||||
|
|
@ -644,7 +644,8 @@ void MacroEditorPage::fill_completer_list ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString s = c.selectedText ().mid (0, pos - pos0);
|
QString ssel = c.selectedText ();
|
||||||
|
QString s = ssel.mid (0, pos - pos0);
|
||||||
|
|
||||||
QString text = mp_text->toPlainText ();
|
QString text = mp_text->toPlainText ();
|
||||||
|
|
||||||
|
|
@ -660,7 +661,7 @@ void MacroEditorPage::fill_completer_list ()
|
||||||
w += *c;
|
w += *c;
|
||||||
++c;
|
++c;
|
||||||
}
|
}
|
||||||
if (! w.isEmpty () && w != s) {
|
if (! w.isEmpty () && w != s && w != ssel) {
|
||||||
words.insert (w);
|
words.insert (w);
|
||||||
}
|
}
|
||||||
++i;
|
++i;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue