Sentry: correct breadcrumbs for menu item activates.
This commit is contained in:
parent
c951f3fcf4
commit
28f562d0ec
2 changed files with 6 additions and 4 deletions
|
@ -12,6 +12,7 @@
|
|||
|
||||
#include <Main/fg_props.hxx>
|
||||
#include <GUI/CocoaHelpers_private.h>
|
||||
#include <Main/sentryIntegration.hxx>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
@ -222,7 +223,10 @@ void FGCocoaMenuBar::CocoaMenuBarPrivate::fireBindingsForItem(NSMenuItem *item)
|
|||
if (it == itemBindings.end()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
NSString* label = [item title];
|
||||
const auto s = stdStringFromCocoa(label);
|
||||
flightgear::addSentryBreadcrumb("fire menu item:" + s, "info");
|
||||
fireBindingList(it->second);
|
||||
}
|
||||
|
||||
|
|
|
@ -161,9 +161,7 @@ FGPUIMenuBar::fireItem (puObject * item)
|
|||
const char * name = item->getLegend();
|
||||
vector<SGBinding *> &bindings = _bindings[name];
|
||||
int nBindings = bindings.size();
|
||||
|
||||
const string label = item->getLabel() ? string{ item->getLabel() } : "<unknown>";
|
||||
flightgear::addSentryBreadcrumb("fire menu item:" + label, "info");
|
||||
flightgear::addSentryBreadcrumb("fire menu item:" + string{name}, "info");
|
||||
|
||||
for (int i = 0; i < nBindings; i++)
|
||||
bindings[i]->fire();
|
||||
|
|
Loading…
Reference in a new issue