QmlJS::IContextPane adapting the interface

closing windows with escape is now stacked again
This commit is contained in:
Thomas Hartmann
2010-07-15 16:40:19 +02:00
parent afda9bb45e
commit c03f2b03b2
4 changed files with 57 additions and 24 deletions

View File

@@ -1306,7 +1306,11 @@ bool QmlJSTextEditor::event(QEvent *e)
switch (e->type()) {
case QEvent::ShortcutOverride:
if (static_cast<QKeyEvent*>(e)->key() == Qt::Key_Escape && m_contextPane) {
m_contextPane->apply(editableInterface(), m_semanticInfo.document, m_semanticInfo.snapshot, 0, false);
if ((m_contextPane) && m_contextPane->widget()->isVisible()) {
m_contextPane->apply(editableInterface(), m_semanticInfo.document, m_semanticInfo.snapshot, 0, false);
e->accept();
return true;
}
}
break;
default: