Commit 2bb04664 authored by Friedemann Kleint's avatar Friedemann Kleint

Design mode switch: Bring back mode changed slot.

to update Bauhaus correctly.
Reviewed-by: default avatarLasse Holmstedt <lasse.holmstedt@nokia.com>
parent 2edcc7ef
......@@ -224,6 +224,8 @@ void BauhausPlugin::createDesignModeWidget()
connect(m_editorManager, SIGNAL(editorsClosed(QList<Core::IEditor*>)),
this, SLOT(textEditorsClosed(QList<Core::IEditor*>)));
connect(Core::ModeManager::instance(), SIGNAL(currentModeChanged(Core::IMode*)),
this, SLOT(modeChanged(Core::IMode*)));
}
void BauhausPlugin::updateEditor(Core::IEditor *editor)
......@@ -236,6 +238,19 @@ void BauhausPlugin::updateEditor(Core::IEditor *editor)
}
}
void BauhausPlugin::modeChanged(Core::IMode *mode)
{
if (mode == m_designMode) {
m_isActive = true;
m_mainWidget->showEditor(m_editorManager->currentEditor());
} else {
if (m_isActive) {
m_isActive = false;
m_mainWidget->showEditor(0);
}
}
}
void BauhausPlugin::textEditorsClosed(QList<Core::IEditor*> editors)
{
m_mainWidget->closeEditors(editors);
......
......@@ -84,6 +84,7 @@ private slots:
void textEditorsClosed(QList<Core::IEditor *> editors);
void updateActions(Core::IEditor* editor);
void updateEditor(Core::IEditor *editor);
void modeChanged(Core::IMode *mode);
private:
void createDesignModeWidget();
......
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