add GetLabel to ResourceLabelManager

This commit is contained in:
scawful
2024-08-20 11:06:06 -04:00
parent a288dd8933
commit 2443336f9d
3 changed files with 9 additions and 31 deletions

View File

@@ -154,6 +154,11 @@ void ResourceLabelManager::SelectableLabelWithNameEdit(
}
}
std::string ResourceLabelManager::GetLabel(const std::string& type,
const std::string& key) {
return labels_[type][key];
}
std::string ResourceLabelManager::CreateOrGetLabel(
const std::string& type, const std::string& key,
const std::string& defaultValue) {

View File

@@ -38,6 +38,7 @@ struct ResourceLabelManager {
void SelectableLabelWithNameEdit(bool selected, const std::string& type,
const std::string& key,
const std::string& defaultValue);
std::string GetLabel(const std::string& type, const std::string& key);
std::string CreateOrGetLabel(const std::string& type, const std::string& key,
const std::string& defaultValue);