--- a/src/main.cpp Wed Jun 15 13:05:53 2022 +0300 +++ b/src/main.cpp Wed Jun 15 19:47:02 2022 +0300 @@ -252,6 +252,7 @@ action->setChecked(renderPreferences->style == data.payload); } ui->actionDrawAxes->setChecked(renderPreferences->drawAxes); + ui->actionWireframe->setChecked(renderPreferences->wireframe); }; static gl::RenderPreferences loadRenderPreferences() @@ -264,6 +265,7 @@ .lineThickness = setting<Setting::LineThickness>(), .lineAntiAliasing = setting<Setting::LineAntiAliasing>(), .drawAxes = setting<Setting::DrawAxes>(), + .wireframe = setting<Setting::Wireframe>(), }; } @@ -342,6 +344,7 @@ setSetting<Setting::RecentFiles>(recentlyOpenedFiles); setSetting<Setting::RenderStyle>(renderPreferences.style); setSetting<Setting::DrawAxes>(renderPreferences.drawAxes); + setSetting<Setting::Wireframe>(renderPreferences.wireframe); libraries.storeToSettings(); }; const auto updateRecentlyOpenedDocumentsMenu = [&]{ @@ -562,6 +565,11 @@ saveSettings(); updateRenderPreferences(&ui, &renderPreferences, &documents); }); + QObject::connect(ui.actionWireframe, &QAction::triggered, [&](bool enabled){ + renderPreferences.wireframe = enabled; + saveSettings(); + updateRenderPreferences(&ui, &renderPreferences, &documents); + }); for (auto data : ::renderStyleButtons) { QAction* action = data.memberInstance(&ui); QObject::connect(action, &QAction::triggered, [&, data]{