Commit 24aecf63 authored by Halla Rempt's avatar Halla Rempt

Add a part to the document so we can d&d and insert layers again

BUG:305371

Note: we probably are leaking the part object, so I need to check that.
parent 43ff6282
......@@ -42,11 +42,13 @@
#include "kis_selection.h"
#include "kis_node_commands_adapter.h"
#include "kis_group_layer.h"
#include "kis_part2.h"
#include <QMessageBox>
struct KisImportCatcher::Private
{
public:
KisPart2* part;
KisDoc2* doc;
KisView2* view;
KUrl url;
......@@ -55,7 +57,10 @@ public:
KisImportCatcher::KisImportCatcher(const KUrl & url, KisView2 * view)
: m_d(new Private)
{
m_d->doc = new KisDoc2(0);
KisPart2 *part = new KisPart2(0);
m_d->doc = new KisDoc2(part);
part->setDocument(m_d->doc);
m_d->view = view;
m_d->url = url;
KoFilterManager manager(m_d->doc);
......
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