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:
committed by
abdullahtahiriyo
parent
82fed5bbfc
commit
3f1f1047b2
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user