Commit 043164b4 authored by Lasse Holmstedt's avatar Lasse Holmstedt
Browse files

Fix for closing splitters when editors are opened before split

Now, ctrl+w closes all editors, as does "X" button in the toolbar.

Reviewed-by: mae
parent 06549b72
......@@ -165,9 +165,9 @@ EditorView::~EditorView()
void EditorView::closeView()
{
EditorManager *em = CoreImpl::instance()->editorManager();
if (IEditor *editor = currentEditor()) {
em->closeDuplicate(editor);
}
IEditor *editor = currentEditor();
if (editor)
em->closeEditor(editor);
}
void EditorView::showEditorInfoBar(const QString &id,
const QString &infoText,
......@@ -705,7 +705,9 @@ void SplitterOrView::split(Qt::Orientation orientation)
SplitterOrView *otherView = 0;
if (e) {
m_view->removeEditor(e);
foreach(IEditor *editor, m_view->editors())
m_view->removeEditor(editor);
m_splitter->addWidget((view = new SplitterOrView(e)));
if (e->duplicateSupported()) {
Core::IEditor *duplicate = em->duplicateEditor(e);
......
......@@ -177,7 +177,6 @@ void EditorToolBar::closeView()
if (m_isStandalone) {
EditorManager *em = ICore::instance()->editorManager();
if (IEditor *editor = currentEditor()) {
//em->closeDuplicate(editor);
em->closeEditor(editor);
}
}
......
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