From 9c20523110b6601abd001eb6316c563ff1b53af0 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Fri, 13 Nov 2009 13:56:32 +0000 Subject: [PATCH] Correct sorting in wxDataViewTreeStore, fixes #11436, part II git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/datavcmn.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp index 29dbb6d471..bb258cd33b 100644 --- a/src/common/datavcmn.cpp +++ b/src/common/datavcmn.cpp @@ -2006,13 +2006,13 @@ int wxDataViewTreeStore::Compare( const wxDataViewItem &item1, const wxDataViewI return 0; } - if (node1->IsContainer() && !!node2->IsContainer()) - return 1; - - if (node2->IsContainer() && !!node1->IsContainer()) + if (node1->IsContainer() && !node2->IsContainer()) return -1; - return parent1->GetChildren().IndexOf( node1 ) - parent1->GetChildren().IndexOf( node2 ); + if (node2->IsContainer() && !node1->IsContainer()) + return 1; + + return parent1->GetChildren().IndexOf( node1 ) - parent2->GetChildren().IndexOf( node2 ); } wxDataViewTreeStoreNode *wxDataViewTreeStore::FindNode( const wxDataViewItem &item ) const -- 2.45.2