[Gui] UserEditMode : add cross comments in case a new edit mode has to be added

This commit is contained in:
0penBrain
2021-05-13 11:30:21 +02:00
parent b84bb1a16a
commit 1e3b9fb166
2 changed files with 6 additions and 0 deletions

View File

@@ -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 <int, std::string> userEditModes {
{0, QT_TRANSLATE_NOOP("EditMode", "Default")},
{1, QT_TRANSLATE_NOOP("EditMode", "Transform")},

View File

@@ -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,