diff options
Diffstat (limited to 'src/mainview.cpp')
-rw-r--r-- | src/mainview.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp index a771e3d7..0de4ea40 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -702,7 +702,7 @@ void MainView::resizeEvent(QResizeEvent *event) } -void MainView::detachTab(int index) +void MainView::detachTab(int index, MainWindow *toWindow) { if (index < 0) index = currentIndex(); @@ -723,7 +723,11 @@ void MainView::detachTab(int index) UrlBar *bar = _widgetBar->urlBar(index); closeTab(index, false); - MainWindow *w = Application::instance()->newMainWindow(false); + MainWindow *w; + if( toWindow == NULL ) + w = Application::instance()->newMainWindow(false); + else + w = toWindow; w->mainView()->addTab(tab, Application::icon(u), label); w->mainView()->widgetBar()->insertWidget(0, bar); w->mainView()->updateTabBar(); |