- updateToc();
- // Buffer-dependent dialogs should be updated or
- // hidden. This should go here because some dialogs (eg ToC)
- // require bv_->text.
- updateBufferDependent(true);
- updateToolbars();
- updateLayoutList();
- updateStatusBar();
+ structureChanged();
+
+ // The document settings needs to be reinitialised.
+ updateDialog("document", "");
+
+ // Buffer-dependent dialogs must be updated. This is done here because
+ // some dialogs require buffer()->text.
+ updateDialogs();
+}
+
+
+void GuiView::on_lastWorkAreaRemoved()
+{
+#ifdef Q_WS_MACX
+ // On Mac close the view if there is no Tab open anymore,
+ // but only if no splitter is visible
+ if (!lyxrc.open_buffers_in_tabs && d.splitter_->count() == 1) {
+ TabWorkArea * twa = qobject_cast<TabWorkArea *>(d.splitter_->widget(0));
+ if (twa && twa->count() == 0) {
+ // close the view, as no tab is open anymore
+ QTimer::singleShot(0, this, SLOT(close()));
+ }
+ }
+#else
+ structureChanged();
+ // The document settings needs to be reinitialised.
+ updateDialog("document", "");
+ updateDialogs();
+#endif