--- a/src/main.cpp Sun Jun 12 23:59:37 2022 +0300 +++ b/src/main.cpp Mon Jun 13 02:18:25 2022 +0300 @@ -8,6 +8,7 @@ #include "ui_mainwindow.h" #include "version.h" #include "gl/axesprogram.h" +#include "gl/gridprogram.h" #include "gl/partrenderer.h" #include "document.h" #include "settingseditor/settingseditor.h" @@ -41,6 +42,7 @@ std::unique_ptr<QItemSelectionModel> itemSelectionModel; std::unique_ptr<EditTools> tools; std::unique_ptr<AxesLayer> axesLayer; + std::unique_ptr<GridLayer> gridLayer; Model* model; }; #include "main.moc" @@ -397,9 +399,11 @@ data->canvas = std::make_unique<PartRenderer>(model, &documents, colorTable); data->itemSelectionModel = std::make_unique<QItemSelectionModel>(model); data->axesLayer = std::make_unique<AxesLayer>(); + data->gridLayer = std::make_unique<GridLayer>(); data->model = model; data->canvas->addRenderLayer(data->axesLayer.get()); data->canvas->setLayerEnabled(data->axesLayer.get(), settings.drawAxes()); + data->canvas->addRenderLayer(data->gridLayer.get()); documents.setModelPayload(modelId, data); QObject::connect( data->tools.get(),