Commit 9bad0c01 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Design mode: Position editor popup (Ctrl-Tab) correctly.


Reviewed-by: default avatarLasse Holmstedt <lasse.holmstedt@nokia.com>
Task-number: QTCREATORBUG-2002
parent 111b89d7
...@@ -1628,7 +1628,10 @@ void EditorManager::showPopupOrSelectDocument() const ...@@ -1628,7 +1628,10 @@ void EditorManager::showPopupOrSelectDocument() const
if (QApplication::keyboardModifiers() == Qt::NoModifier) { if (QApplication::keyboardModifiers() == Qt::NoModifier) {
windowPopup()->selectAndHide(); windowPopup()->selectAndHide();
} else { } else {
const QPoint p(mapToGlobal(QPoint(0, 0))); // EditorManager is invisible when invoked from Design Mode.
const QPoint p = isVisible() ?
mapToGlobal(QPoint(0, 0)) :
m_d->m_core->mainWindow()->mapToGlobal(QPoint(0, 0));
windowPopup()->move((width()-m_d->m_windowPopup->width())/2 + p.x(), windowPopup()->move((width()-m_d->m_windowPopup->width())/2 + p.x(),
(height()-m_d->m_windowPopup->height())/2 + p.y()); (height()-m_d->m_windowPopup->height())/2 + p.y());
windowPopup()->setVisible(true); windowPopup()->setVisible(true);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment