MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / sSendFocusView

Method sSendFocusView

src/Gui/ApplicationPy.cpp:1152–1170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1150}
1151
1152PyObject* ApplicationPy::sSendFocusView(PyObject* /*self*/, PyObject* args)
1153{
1154 char* psCommandStr = nullptr;
1155 // NOLINTNEXTLINE(cppcoreguidelines-pro-type-cstyle-cast)
1156 PyObject* suppress = Py_False;
1157 if (!PyArg_ParseTuple(args, "s|O!", &psCommandStr, &PyBool_Type, &suppress)) {
1158 return nullptr;
1159 }
1160
1161 requirePythonMainThread("FreeCADGui.SendMsgToFocusView");
1162
1163 if (!Application::Instance->sendMsgToFocusView(psCommandStr)) {
1164 if (!Base::asBoolean(suppress)) {
1165 Base::Console().warning("Unknown view command: %s\n", psCommandStr);
1166 }
1167 }
1168
1169 Py_Return;
1170}
1171
1172PyObject* ApplicationPy::sGetMainWindow(PyObject* /*self*/, PyObject* args)
1173{

Callers

nothing calls this directly

Calls 4

requirePythonMainThreadFunction · 0.85
asBooleanFunction · 0.85
sendMsgToFocusViewMethod · 0.80
warningMethod · 0.45

Tested by

no test coverage detected