diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 4dd90c53..765d35b1 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -14672,7 +14672,7 @@ void View::DrawRanges() ImGui::End(); } -void View::DrawRangeEntry( Range& range, const char* label, uint32_t color, const char* popupLabel ) +void View::DrawRangeEntry( Range& range, const char* label, uint32_t color, const char* popupLabel, int id ) { SmallColorBox( color ); ImGui::SameLine(); @@ -14716,6 +14716,16 @@ void View::DrawRangeEntry( Range& range, const char* label, uint32_t color, cons } ImGui::EndPopup(); } + if( id != 0 ) + { + ImGui::SameLine(); + if( SmallButtonDisablable( ICON_FA_SEARCH " Copy from find zone", m_findZone.range.min == 0 && m_findZone.range.max == 0 ) ) range = m_findZone.range; + } + if( id != 1 ) + { + ImGui::SameLine(); + if( SmallButtonDisablable( ICON_FA_SORT_AMOUNT_UP " Copy from statistics", m_statRange.min == 0 && m_statRange.max == 0 ) ) range = m_findZone.range; + } } } diff --git a/server/TracyView.hpp b/server/TracyView.hpp index 42aa9ddc..4013ff85 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -195,7 +195,7 @@ private: void DrawAnnotationList(); void DrawSampleParents(); void DrawRanges(); - void DrawRangeEntry( Range& range, const char* label, uint32_t color, const char* popupLabel ); + void DrawRangeEntry( Range& range, const char* label, uint32_t color, const char* popupLabel, int id ); void ListMemData( std::vector& vec, std::function DrawAddress, const char* id = nullptr, int64_t startTime = -1 );