No real changes, just add SortColumn_XXX symbolic constants which are somewhat
more clear than -1 and -2 used before. Although the code based on the global
variables remains as bad as before.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73634
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// For the generic implementation, both the leaf nodes and the nodes are sorted for
// fast search when needed
static wxDataViewModel* g_model;
// For the generic implementation, both the leaf nodes and the nodes are sorted for
// fast search when needed
static wxDataViewModel* g_model;
-static int g_column = -2;
+
+// The column is either the index of the column to be used for sorting or one
+// of the special values in this enum:
+enum
+{
+ // Don't sort at all.
+ SortColumn_None = -2,
+
+ // Sort using the model default sort order.
+ SortColumn_Default = -1
+};
+
+static int g_column = SortColumn_None;
static bool g_asending = true;
// ----------------------------------------------------------------------------
static bool g_asending = true;
// ----------------------------------------------------------------------------
if( !col )
{
if (g_model->HasDefaultCompare())
if( !col )
{
if (g_model->HasDefaultCompare())
+ g_column = SortColumn_Default;
+ g_column = SortColumn_None;
g_asending = true;
return;
g_asending = true;
return;