X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/f3a38fc51aab2a2c4e870c73059e9377d2124703..d05ffe96f986bcd33281cb5f97b73c1b4bf2b2ae:/src/dolphinmainwindow.cpp diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 4502e703f..3654ed6c9 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -41,6 +41,7 @@ #include "statusbar/dolphinstatusbar.h" #include "views/dolphinviewactionhandler.h" #include "views/dolphinremoteencoding.h" +#include "views/draganddrophelper.h" #include "views/viewproperties.h" #ifndef Q_OS_WIN @@ -510,12 +511,12 @@ void DolphinMainWindow::openNewTab(const KUrl& url) actionCollection()->action("close_tab")->setEnabled(true); - // provide a split view, if the startup settings are set this way + // Provide a split view, if the startup settings are set this way if (GeneralSettings::splitView()) { const int newTabIndex = m_viewTab.count() - 1; createSecondaryView(newTabIndex); - viewTab.secondaryView->setActive(true); - viewTab.isPrimaryViewActive = false; + m_viewTab[newTabIndex].secondaryView->setActive(true); + m_viewTab[newTabIndex].isPrimaryViewActive = false; } if (focusWidget) { @@ -1327,9 +1328,9 @@ void DolphinMainWindow::tabDropEvent(int tab, QDropEvent* event) const KUrl::List urls = KUrl::List::fromMimeData(event->mimeData()); if (!urls.isEmpty() && tab != -1) { const ViewTab& viewTab = m_viewTab[tab]; - const KUrl destPath = viewTab.isPrimaryViewActive ? viewTab.primaryView->url() : viewTab.secondaryView->url(); - Q_UNUSED(destPath); - //DragAndDropHelper::instance().dropUrls(KFileItem(), destPath, event, m_tabBar); + const DolphinView* view = viewTab.isPrimaryViewActive ? viewTab.primaryView->view() + : viewTab.secondaryView->view(); + DragAndDropHelper::dropUrls(view->rootItem(), event); } }