From d200385c1aa5992484d448906a6fea7a2dea66a0 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 13 Jun 2020 19:22:30 +0200 Subject: [PATCH] LibWeb: Sort style properties by name in the inspector window --- Libraries/LibWeb/StylePropertiesModel.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Libraries/LibWeb/StylePropertiesModel.cpp b/Libraries/LibWeb/StylePropertiesModel.cpp index 95f6bc553d2..c71d0505cc8 100644 --- a/Libraries/LibWeb/StylePropertiesModel.cpp +++ b/Libraries/LibWeb/StylePropertiesModel.cpp @@ -24,6 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include #include #include #include @@ -40,6 +41,8 @@ StylePropertiesModel::StylePropertiesModel(const StyleProperties& properties) value.value = property_value.to_string(); m_values.append(value); }); + + quick_sort(m_values, [](auto& a, auto& b) { return a.name < b.name; }); } int StylePropertiesModel::row_count(const GUI::ModelIndex&) const