diff -r 1fa0e1de9f0a -r 10a6298f636f src/main.cpp --- a/src/main.cpp Mon Jun 20 18:40:22 2022 +0300 +++ b/src/main.cpp Mon Jun 20 19:49:56 2022 +0300 @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include "mainwindow.h" @@ -55,6 +56,7 @@ QCoreApplication::setApplicationName(::appName); QCoreApplication::setOrganizationName("hecknology.net"); QCoreApplication::setOrganizationDomain("hecknology.net"); + qRegisterMetaType(); qRegisterMetaTypeStreamOperators("Library"); qRegisterMetaTypeStreamOperators("Libraries"); qRegisterMetaTypeStreamOperators(); @@ -343,7 +345,6 @@ return result; } -#include int main(int argc, char *argv[]) { doQtRegistrations(); @@ -478,6 +479,7 @@ } } }); + QObject::connect(data->canvas.get(), &PartRenderer::message, &messageLog, &MessageLog::addMessage); const QFileInfo fileInfo{*documents.modelPath(modelId)}; ModelSubWindow* subWindow = new ModelSubWindow{modelId, ui.mdiArea}; subWindow->setWidget(data->canvas.get()); @@ -636,6 +638,7 @@ ui.messageLog->setProperty("shouldAutoScroll", bar->value() == bar->maximum()); }); QObject::connect(&messageLog, &MessageLog::rowsInserted, [&]{ + ui.messageLog->resizeRowsToContents(); if (ui.messageLog->property("shouldAutoScroll").toBool()) { ui.messageLog->scrollToBottom(); }