src/documentmanager.cpp

changeset 235
7ef03c2b46ab
parent 230
a1f3f7d9078b
child 259
c27612f0eac0
--- a/src/documentmanager.cpp	Mon Jun 20 16:59:09 2022 +0300
+++ b/src/documentmanager.cpp	Mon Jun 20 17:27:30 2022 +0300
@@ -42,6 +42,7 @@
 		.opentype = OpenType::ManuallyOpened,
 	}));
 	this->makePolygonCacheForModel(modelId);
+	Q_EMIT this->message(logInfo(tr("New model %1 created").arg(modelId.value)));
 	return modelId;
 }
 
@@ -135,6 +136,7 @@
 		}));
 		this->makePolygonCacheForModel(modelId);
 		result = modelId;
+		Q_EMIT this->message(logInfo(tr("Opened %1 as model %2").arg(quoted(path)).arg(modelId.value)));
 	}
 	else
 	{
@@ -303,6 +305,7 @@
 		for (ModelId idToPrune : prunable) {
 			auto it = this->openModels.find(idToPrune);
 			if (it != this->openModels.end()) {
+				Q_EMIT this->message(logInfo(tr("Model %1 (%2) pruned").arg(idToPrune.value).arg(it->second.path)));
 				this->openModels.erase(it);
 			}
 			removeFromSet(autoOpened, idToPrune);

mercurial