diff options
-rw-r--r-- | src/Authoring/Qt3DStudio/Palettes/Action/ActionView.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Authoring/Qt3DStudio/Palettes/Action/ActionView.cpp b/src/Authoring/Qt3DStudio/Palettes/Action/ActionView.cpp index cd4c4fb6..1c4fe0f2 100644 --- a/src/Authoring/Qt3DStudio/Palettes/Action/ActionView.cpp +++ b/src/Authoring/Qt3DStudio/Palettes/Action/ActionView.cpp @@ -533,6 +533,22 @@ QObject *ActionView::showEventBrowser(const QPoint &point) qt3dsdm::TEventHandleList eventList; bridge->GetEvents(instanceHandle, eventList); + + // Only show time events if the selected object is a signal + auto info = m_objRefHelper->GetInfo(m_itemHandle); + if (info.m_Type == OBJTYPE_SIGNAL) { + qt3dsdm::TEventHandleList filteredEventList; + auto thePos = eventList.begin(); + for (; thePos != eventList.end(); ++thePos) { + qt3dsdm::SEventInfo theEvent = bridge->GetEventInfo(*thePos); + QString name = QString::fromWCharArray(theEvent.m_Category.wide_str()); + + if (name == QString("Time")) + filteredEventList.emplace_back(*thePos); + } + eventList = filteredEventList; + } + m_eventsModel->setEventList(eventList); if (!m_eventsBrowser) |