send Messages to the active view
| 1482 | |
| 1483 | /// send Messages to the active view |
| 1484 | bool 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 | |
| 1500 | bool Application::sendHasMsgToFocusView(const char* pMsg) |
| 1501 | { |
no test coverage detected