Commit 38852160 authored by con's avatar con

Send contextAboutToChange before current context object is updated.

Task-number: QTCREATORBUG-3597
parent 69bbb52b
......@@ -1150,15 +1150,12 @@ void MainWindow::updateContextObject(IContext *context)
{
if (context == m_activeContext)
return;
IContext *oldContext = m_activeContext;
emit m_coreImpl->contextAboutToChange(context);
m_activeContext = context;
if (!context || oldContext != m_activeContext) {
emit m_coreImpl->contextAboutToChange(context);
updateContext();
if (debugMainWindow)
qDebug() << "new context object =" << context << (context ? context->widget() : 0)
<< (context ? context->widget()->metaObject()->className() : 0);
}
updateContext();
if (debugMainWindow)
qDebug() << "new context object =" << context << (context ? context->widget() : 0)
<< (context ? context->widget()->metaObject()->className() : 0);
}
void MainWindow::resetContext()
......
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