Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit 64e4e0fe authored by Boudewijn Rempt's avatar Boudewijn Rempt

Add a notify parameter to KisPart::createDocument

When creating a document from libkis' Krita class, we don't want
the Notifier to go off and create spurious and pretty useless

(cherry picked from commit 7f973f64007637a2d4d175de5a4a2fab33bbc13c)
parent 880f6a65
......@@ -122,7 +122,8 @@ Document* Krita::activeDocument() const
return 0;
KisDocument *document = view->document();
return new Document(document, false);
Document *d = new Document(document, false);
return d;
void Krita::setActiveDocument(Document* value)
......@@ -301,7 +302,9 @@ QStringList Krita::recentDocuments() const
Document* Krita::createDocument(int width, int height, const QString &name, const QString &colorModel, const QString &colorDepth, const QString &profile, double resolution)
KisDocument *document = KisPart::instance()->createDocument();
KisPart::instance()->addDocument(document, false);
const KoColorSpace *cs = KoColorSpaceRegistry::instance()->colorSpace(colorModel, colorDepth, profile);
......@@ -314,7 +317,9 @@ Document* Krita::createDocument(int width, int height, const QString &name, cons
return new Document(document, true);
Document *doc = new Document(document, true);
return doc;
Document* Krita::openDocument(const QString &filename)
......@@ -190,14 +190,16 @@ void KisPart::updateIdleWatcherConnections()
void KisPart::addDocument(KisDocument *document)
void KisPart::addDocument(KisDocument *document, bool notify)
//dbgUI << "Adding document to part list" << document;
if (!d->documents.contains(document)) {
emit documentOpened('/'+objectName());
emit sigDocumentAdded(document);
if (notify){
emit documentOpened('/'+ objectName());
emit sigDocumentAdded(document);
connect(document, SIGNAL(sigSavingFinished()), SLOT(slotDocumentSaved()));
......@@ -97,7 +97,7 @@ public:
* Add the specified document to the list of documents this KisPart manages.
void addDocument(KisDocument *document);
void addDocument(KisDocument *document, bool notify = true);
* @return a list of all documents this part manages
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