Update document tab label after saving

Tue, 28 Sep 2021 00:21:09 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Tue, 28 Sep 2021 00:21:09 +0300
changeset 142
e085f36e4d9f
parent 141
185eb297dc1e
child 143
7b62c52835a1

Update document tab label after saving

src/mainwindow.cpp file | annotate | diff | comparison | revisions
--- a/src/mainwindow.cpp	Tue Sep 28 00:10:29 2021 +0300
+++ b/src/mainwindow.cpp	Tue Sep 28 00:21:09 2021 +0300
@@ -301,6 +301,7 @@
 		if (not newPath.isEmpty())
 		{
 			this->currentDocument()->setModelPath(newPath);
+			this->ui->tabs->setTabText(this->ui->tabs->currentIndex(), QFileInfo{newPath}.fileName());
 			this->actionSave();
 		}
 	}

mercurial