File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed
Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -934,6 +934,19 @@ void CDockAreaWidget::updateTitleBarVisibility()
934934}
935935
936936
937+ // ============================================================================
938+ void CDockAreaWidget::updateWindowTitle ()
939+ {
940+ auto currentWidget = d->ContentsLayout ->currentWidget ();
941+ if (d->TitleBar && currentWidget)
942+ {
943+ d->TitleBar ->autoHideTitleLabel ()->setText (currentWidget->windowTitle ());
944+ }
945+
946+ markTitleBarMenuOutdated ();
947+ }
948+
949+
937950// ============================================================================
938951void CDockAreaWidget::markTitleBarMenuOutdated ()
939952{
Original file line number Diff line number Diff line change @@ -165,6 +165,11 @@ private Q_SLOTS:
165165 */
166166 void internalSetCurrentDockWidget (CDockWidget* DockWidget);
167167
168+ /* *
169+ * Call this function to update the window title
170+ */
171+ void updateWindowTitle ();
172+
168173 /* *
169174 * Marks tabs menu to update
170175 */
Original file line number Diff line number Diff line change @@ -883,7 +883,7 @@ bool CDockWidget::event(QEvent *e)
883883 }
884884 if (d->DockArea )
885885 {
886- d->DockArea ->markTitleBarMenuOutdated ();// update tabs menu
886+ d->DockArea ->updateWindowTitle ();
887887 }
888888
889889 auto FloatingWidget = floatingDockContainer ();
You can’t perform that action at this time.
0 commit comments