Переглянути джерело

Fix title change handling

Steven Silvester 9 роки тому
батько
коміт
2e2a7dfdda
1 змінених файлів з 4 додано та 4 видалено
  1. 4 4
      src/docmanager/index.ts

+ 4 - 4
src/docmanager/index.ts

@@ -827,10 +827,10 @@ class DocumentWidget extends Widget {
     this.title.icon = child.title.icon;
     this.title.className = child.title.className;
     // Mirror this title based on the child.
-    this.title.changed.connect(() => {
-      this.parent.title.text = child.title.text;
-      this.parent.title.icon = child.title.icon;
-      this.parent.title.className = child.title.className;
+    child.title.changed.connect(() => {
+      this.title.text = child.title.text;
+      this.title.icon = child.title.icon;
+      this.title.className = child.title.className;
     });
     // Add the child widget to the layout.
     (this.layout as PanelLayout).addChild(child);