completer fixes
This commit is contained in:
@@ -416,7 +416,7 @@ bool QCodeEdit::eventFilter(QObject * o, QEvent * e) {
|
||||
completer->hide();
|
||||
hideHelp();
|
||||
}
|
||||
if (e->type() == QEvent::MouseMove) {
|
||||
if (e->type() == QEvent::MouseMove && completer->isHidden()) {
|
||||
QMouseEvent * me = (QMouseEvent*)e;
|
||||
if (me->modifiers().testFlag(Qt::ControlModifier)) {
|
||||
showLink();
|
||||
|
||||
@@ -70,21 +70,16 @@ void QCodeEditCompleter::addItems(QFont f, const QCodeEdit::ACClass & cl, const
|
||||
}
|
||||
|
||||
|
||||
bool QCodeEditCompleter::isEmpty() const {
|
||||
return topLevelItemCount() <= 1;
|
||||
}
|
||||
|
||||
|
||||
void QCodeEditCompleter::invoke(QPoint global_pos) {
|
||||
if (isEmpty()) {
|
||||
hide();
|
||||
return;
|
||||
}
|
||||
setCurrentItem(topLevelItem(1));
|
||||
if (isHidden())
|
||||
move(global_pos);
|
||||
if (topLevelItemCount() > 1) setCurrentItem(topLevelItem(1));
|
||||
if (isHidden()) move(global_pos);
|
||||
if (topLevelItemCount() > 0) {
|
||||
setVisible(true);
|
||||
adjust();
|
||||
} else {
|
||||
hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -34,7 +34,6 @@ public:
|
||||
void nextCompletition();
|
||||
void previousCompletition();
|
||||
void addItems(QFont f, const QCodeEdit::ACClass & cl, const QCodeEdit::ACSection & items);
|
||||
bool isEmpty() const;
|
||||
void invoke(QPoint global_pos);
|
||||
|
||||
QString currentReturn() const;
|
||||
|
||||
Reference in New Issue
Block a user