summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Cullmann <cullmann@kde.org>2014-01-22 23:03:30 (GMT)
committerChristoph Cullmann <cullmann@kde.org>2014-01-22 23:03:30 (GMT)
commit9830288878e756219dbb41d16ae13b2fc123299b (patch)
treebabc3e9c05b2a5db9336df07e929c3ad2c379cd0
parentd946b239d0d84acada5aadc20dfdcc6a68cc380c (diff)
use right createView, of viewmanager, not viewspace
-rw-r--r--kate/app/kateviewmanager.cpp9
-rw-r--r--kate/app/kateviewmanager.h2
2 files changed, 6 insertions, 5 deletions
diff --git a/kate/app/kateviewmanager.cpp b/kate/app/kateviewmanager.cpp
index 9deaee8..c1c076c 100644
--- a/kate/app/kateviewmanager.cpp
+++ b/kate/app/kateviewmanager.cpp
@@ -359,7 +359,7 @@ void KateViewManager::documentSavedOrUploaded(KTextEditor::Document *doc, bool)
m_mainWindow->fileOpenRecent()->addUrl( doc->url() );
}
-bool KateViewManager::createView ( KTextEditor::Document *doc )
+bool KateViewManager::createView ( KTextEditor::Document *doc, KateViewSpace *vs )
{
if (m_blockViewCreationAndActivation) return false;
@@ -371,7 +371,7 @@ bool KateViewManager::createView ( KTextEditor::Document *doc )
* create view, registers its XML gui itself
* pass the view the correct main window
*/
- KTextEditor::View *view = activeViewSpace()->createView (doc);
+ KTextEditor::View *view = (vs ? vs : activeViewSpace())->createView (doc);
m_viewList.append (view);
m_activeStates[view] = false;
@@ -391,7 +391,8 @@ bool KateViewManager::createView ( KTextEditor::Document *doc )
m_activityResources[view]->setUri(doc->url());
#endif
- activateView( view );
+ if (!vs)
+ activateView( view );
return true;
}
@@ -653,7 +654,7 @@ void KateViewManager::slotDelayedViewChanged ()
*/
Q_FOREACH (KateViewSpace *vs, m_viewSpaceList) {
if (!vs->currentView())
- vs->createView (newActiveView->document());
+ createView (newActiveView->document(), vs);
}
emit viewChanged (newActiveView);
diff --git a/kate/app/kateviewmanager.h b/kate/app/kateviewmanager.h
index 0edb140..66f3158 100644
--- a/kate/app/kateviewmanager.h
+++ b/kate/app/kateviewmanager.h
@@ -126,7 +126,7 @@ class KateViewManager : public QSplitter
* create and activate a new view for doc, if doc == 0, then
* create a new document
*/
- bool createView ( KTextEditor::Document *doc = 0L );
+ bool createView ( KTextEditor::Document *doc = 0L, KateViewSpace *vs = nullptr );
private:
bool deleteView ( KTextEditor::View *view);