Skip to content

Commit 74bd703

Browse files
authored
iv info window: sort metadata, like we do for 'oiiotool -info' (#2159)
1 parent c538fa0 commit 74bd703

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/iv/ivimage.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,12 @@ IvImage::longinfo() const
213213
if (m_spec.z_channel >= 0)
214214
m_longinfo += html_table_row("Depth (z) channel", m_spec.z_channel);
215215

216-
for (auto&& p : m_spec.extra_attribs) {
216+
// Sort the metadata alphabetically, case-insensitive, but making
217+
// sure that all non-namespaced attribs appear before namespaced
218+
// attribs.
219+
ParamValueList attribs = m_spec.extra_attribs;
220+
attribs.sort(false /* sort case-insensitively */);
221+
for (auto&& p : attribs) {
217222
std::string s = m_spec.metadata_val(p, true);
218223
m_longinfo += html_table_row(p.name().c_str(), s);
219224
}

0 commit comments

Comments
 (0)