From 7409bf25d9e64ce2f84cebc246f66236caebe4e0 Mon Sep 17 00:00:00 2001 From: rawpowerlaxity Date: Wed, 6 Dec 2023 20:54:32 +0100 Subject: [PATCH] [minor] Changed the text used for displaying sequence reference count --- SIDFactoryII/source/runtime/editor/screens/screen_edit.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SIDFactoryII/source/runtime/editor/screens/screen_edit.cpp b/SIDFactoryII/source/runtime/editor/screens/screen_edit.cpp index 5c71e48..ed2c413 100644 --- a/SIDFactoryII/source/runtime/editor/screens/screen_edit.cpp +++ b/SIDFactoryII/source/runtime/editor/screens/screen_edit.cpp @@ -2171,8 +2171,11 @@ namespace Editor m_CPUMemory->Lock(); std::vector sequence_index_use_count = DriverUtils::GetSequenceUsageCount(*m_DriverInfo, *m_CPUMemory); m_CPUMemory->Unlock(); - std::string text = " Sequence index: " + EditorUtils::ConvertToHexValue(inSequenceIndex, m_DisplayState.IsHexUppercase()) + " use count: " + std::to_string(sequence_index_use_count[inSequenceIndex]); - + + const int usage_count = sequence_index_use_count[inSequenceIndex]; + const bool usage_count_plural = usage_count > 1; + + const std::string text = " Sequence " + EditorUtils::ConvertToHexValue(inSequenceIndex, m_DisplayState.IsHexUppercase()) + " referenced " + std::to_string(sequence_index_use_count[inSequenceIndex]) + (usage_count_plural ? " times." : " time."); SetStatusBarMessage(text, 5000); } }