[glass] Plot: Show full source name as tooltip and in popup (#3255)

This commit is contained in:
Peter Johnson
2021-03-20 20:59:31 -07:00
committed by GitHub
parent 2c98939c18
commit d71eb2cf39

View File

@@ -374,9 +374,15 @@ PlotSeries::Action PlotSeries::EmitPlot(PlotView& view, double now, size_t i,
ImPlot::EndLegendDragDropSource();
}
// Show full source name tooltip
if (!m_name.empty() && ImPlot::IsLegendEntryHovered(label)) {
ImGui::SetTooltip("%s", m_id.c_str());
}
// Edit settings via popup
Action rv = kNone;
if (ImPlot::BeginLegendPopup(label)) {
ImGui::TextUnformatted(m_id.c_str());
if (ImGui::Button("Close")) {
ImGui::CloseCurrentPopup();
}