mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-08 10:51:03 +00:00
* On MacOSX enter is no activation key for a QListWidget. Hence it
does not close the command completion popup. Moreover setFocus does not focus the widget correctly, probably because the popup widget behavior is different. An activateWindow solves the problem by selecting the LyX view again as active window. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18840 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
101de631a0
commit
5286634d17
@ -66,8 +66,11 @@ protected:
|
||||
if (ev->key() == Qt::Key_Escape) {
|
||||
hide();
|
||||
return;
|
||||
}
|
||||
QListWidget::keyPressEvent(ev);
|
||||
} else if (ev->key() == Qt::Key_Return || ev->key() == Qt::Key_Space) {
|
||||
// emit signal
|
||||
itemPressed(currentItem());
|
||||
} else
|
||||
QListWidget::keyPressEvent(ev);
|
||||
}
|
||||
};
|
||||
|
||||
@ -185,6 +188,7 @@ void QCommandBuffer::complete_selected(QListWidgetItem * item)
|
||||
QWidget const * widget = static_cast<QWidget const *>(sender());
|
||||
const_cast<QWidget *>(widget)->hide();
|
||||
edit_->setText(item->text() + ' ');
|
||||
edit_->activateWindow();
|
||||
edit_->setFocus();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user