Sketcher: Make GeometryConstructionMode an enum class

=====================================================

Enforce strong typing to avoid all kinds of abusive implicit conversionsm, the corresponding associated bugs and make code more readable.
This commit is contained in:
Abdullah Tahiri
2023-10-21 21:45:35 +02:00
committed by abdullahtahiriyo
parent 82fed5bbfc
commit 3f1f1047b2
16 changed files with 55 additions and 46 deletions

View File

@@ -120,11 +120,11 @@ void CmdSketcherToggleConstruction::activated(int iMsg)
Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager();
if (geometryCreationMode == Construction) {
geometryCreationMode = Normal;
if (geometryCreationMode == GeometryCreationMode::Construction) {
geometryCreationMode = GeometryCreationMode::Normal;
}
else {
geometryCreationMode = Construction;
geometryCreationMode = GeometryCreationMode::Construction;
}
rcCmdMgr.updateCommands("ToggleConstruction", static_cast<int>(geometryCreationMode));