[Gui] UserEditMode : take into account in edit command
+ Mark strings for translation
This commit is contained in:
@@ -235,10 +235,10 @@ public:
|
||||
//@{
|
||||
protected:
|
||||
const std::map <int, std::string> userEditModes {
|
||||
{0, "Default"},
|
||||
{1, "Transform"},
|
||||
{2, "Cutting"},
|
||||
{3, "Color"}
|
||||
{0, QT_TRANSLATE_NOOP("EditMode", "Default")},
|
||||
{1, QT_TRANSLATE_NOOP("EditMode", "Transform")},
|
||||
{2, QT_TRANSLATE_NOOP("EditMode", "Cutting")},
|
||||
{3, QT_TRANSLATE_NOOP("EditMode", "Color")}
|
||||
};
|
||||
int userEditMode = userEditModes.begin()->first;
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include <Base/Type.h>
|
||||
#include <Gui/Application.h>
|
||||
|
||||
/** @defgroup CommandMacros Helper macros for running commands through Python interpreter */
|
||||
//@{
|
||||
@@ -179,8 +180,8 @@
|
||||
auto __obj = _obj;\
|
||||
if(__obj && __obj->getNameInDocument()) {\
|
||||
Gui::Command::doCommand(Gui::Command::Gui,\
|
||||
"Gui.ActiveDocument.setEdit(App.getDocument('%s').getObject('%s'))",\
|
||||
__obj->getDocument()->getName(), __obj->getNameInDocument());\
|
||||
"Gui.ActiveDocument.setEdit(App.getDocument('%s').getObject('%s'), %i)",\
|
||||
__obj->getDocument()->getName(), __obj->getNameInDocument(), Gui::Application::Instance->getUserEditMode());\
|
||||
}\
|
||||
}while(0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user