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

Method sendMsgToFocusView

src/Gui/Application.cpp:1484–1498  ·  view source on GitHub ↗

send Messages to the active view

Source from the content-addressed store, hash-verified

1482
1483/// send Messages to the active view
1484bool Application::sendMsgToFocusView(const char* pMsg)
1485{
1486 MDIView* pView = getMainWindow()->activeWindow();
1487 if (!pView) {
1488 return false;
1489 }
1490 for (auto focus = qApp->focusWidget(); focus; focus = focus->parentWidget()) {
1491 if (focus == pView) {
1492 bool res = pView->onMsg(pMsg);
1493 updateActions(true);
1494 return res;
1495 }
1496 }
1497 return false;
1498}
1499
1500bool Application::sendHasMsgToFocusView(const char* pMsg)
1501{

Callers 4

sSendFocusViewMethod · 0.80
activatedMethod · 0.80
activatedMethod · 0.80
exerciseFunction · 0.80

Calls 3

activeWindowMethod · 0.80
getMainWindowFunction · 0.70
onMsgMethod · 0.45

Tested by

no test coverage detected