aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainwindow/mainwindow.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mainwindow/mainwindow.cpp b/src/mainwindow/mainwindow.cpp
index df5e1c8..b68ddbe 100644
--- a/src/mainwindow/mainwindow.cpp
+++ b/src/mainwindow/mainwindow.cpp
@@ -60,7 +60,12 @@ MainWindow::MainWindow(std::shared_ptr<Configuration> &config, QWidget *parent)
disconnect(navigationBarConnection);
auto *w = qobject_cast<Window *>(window);
- if(w != nullptr) {
+ if(w == nullptr) {
+ // no current subwindow, clear everything
+ setWindowTitle(tr("smolbote"));
+ addressBar->connectWebView(nullptr);
+ navigationToolBar->connectWebView(nullptr);
+ } else {
setWindowTitle(w->windowTitle() + titleSuffix);
titleChangedConnection = connect(w, &Window::windowTitleChanged, this, [this](const QString &title) {
this->setWindowTitle(title + titleSuffix);