From 1e3b9fb166d5ac3400df5f58d7bf6a4358762a9c Mon Sep 17 00:00:00 2001 From: 0penBrain <48731257+0penBrain@users.noreply.github.com> Date: Thu, 13 May 2021 11:30:21 +0200 Subject: [PATCH] [Gui] UserEditMode : add cross comments in case a new edit mode has to be added --- src/Gui/Application.h | 3 +++ src/Gui/ViewProvider.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/Gui/Application.h b/src/Gui/Application.h index edc46d52ed..6c436f97d9 100644 --- a/src/Gui/Application.h +++ b/src/Gui/Application.h @@ -234,6 +234,9 @@ public: /** @name User edit mode */ //@{ protected: + // the below std::map is a translation of 'EditMode' enum in ViewProvider.h + // to add a new edit mode, it should first be added there + // this is only used for GUI user interaction (menu, toolbar, Python API) const std::map userEditModes { {0, QT_TRANSLATE_NOOP("EditMode", "Default")}, {1, QT_TRANSLATE_NOOP("EditMode", "Transform")}, diff --git a/src/Gui/ViewProvider.h b/src/Gui/ViewProvider.h index 257f5a6167..1d5761a87e 100644 --- a/src/Gui/ViewProvider.h +++ b/src/Gui/ViewProvider.h @@ -420,6 +420,9 @@ public: * you can handle most of the events in the viewer by yourself */ //@{ + // the below enum is reflected in 'userEditModes' std::map in Application.h + // so it is possible for the user to choose a default one through GUI + // if you add a mode here, consider to make it accessible there too enum EditMode {Default = 0, Transform, Cutting,