forked from qt-creator/qt-creator
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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user