Commit 951d0237 authored by Halla Rempt's avatar Halla Rempt

Re-route the titlemodified signal through KisView

CCBUG:342669
parent be232338
......@@ -599,6 +599,7 @@ KisDocument::~KisDocument()
// Despite being QObject they needs to be deleted before the image
delete d->shapeController;
delete d->koShapeController;
if (d->image) {
......
......@@ -467,22 +467,15 @@ void KisMainWindow::addView(KisView *view)
if (d->activeView == view) return;
if (d->activeView) {
KisDocument *activeDocument = d->activeView->document();
if (activeDocument) {
activeDocument->disconnect(this);
}
d->activeView->disconnect(this);
}
showView(view);
updateCaption();
emit restoringDone();
bool viewHasDocument = d->activeView ? (d->activeView->document() ? true : false) : false;
if (viewHasDocument) {
connect(d->activeView->document(), SIGNAL(titleModified(QString,bool)), SLOT(slotDocumentTitleModified(QString,bool)));
if (d->activeView) {
connect(d->activeView, SIGNAL(titleModified(QString,bool)), SLOT(slotDocumentTitleModified(QString,bool)));
}
}
......
......@@ -222,7 +222,7 @@ KisView::KisView(KisDocument *document, KoCanvasResourceManager *resourceManager
, d(new Private)
{
Q_ASSERT(document);
connect(document, SIGNAL(titleModified(QString,bool)), this, SIGNAL(titleModified(QString,bool)));
setObjectName(newObjectName());
d->document = document;
......
......@@ -224,6 +224,7 @@ signals:
void sigSizeChanged(const QPointF &oldStillPoint, const QPointF &newStillPoint);
void sigProfileChanged(const KoColorProfile * profile);
void sigColorSpaceChanged(const KoColorSpace* cs);
void titleModified(QString,bool);
protected:
......
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