MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / getDynamicTooltip

Method getDynamicTooltip

source/MRViewer/MRSceneControlMenuItems.cpp:70–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70std::string UndoMenuItem::getDynamicTooltip() const
71{
72 std::string res;
73 if ( const auto& history = Viewer::instanceRef().getGlobalHistoryStore() )
74 {
75 if ( auto action = history->getLastAction( HistoryAction::Type::Undo ) )
76 {
77 if ( auto dynName = getDynamicName( action ) )
78 res = trimHashHashSuffix( *dynName );
79 else
80 res = Locale::translate( trimHashHashSuffix( action->name() ), Locale::genericDomain );
81 }
82 }
83 return res;
84}
85
86void UndoMenuItem::updateUndoListCache_( const HistoryStore& store, HistoryStore::ChangeType type, std::shared_ptr<HistoryAction> )
87{

Callers 2

drawTooltip_Method · 0.80
mcpToolInfoJsonFunction · 0.80

Calls 5

getDynamicNameFunction · 0.85
trimHashHashSuffixFunction · 0.85
getLastActionMethod · 0.80
translateFunction · 0.70
nameMethod · 0.45

Tested by

no test coverage detected