mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
Tables: Fix sort direction (issue 3023). Remove SortOrder from ImGuiTableSortSpecsColumn. Made sort arrow smaller. Added debug stuff in metrics.
This commit is contained in:
@ -3271,10 +3271,10 @@ struct MyItem
|
||||
case MyItemColumnID_Description: delta = (strcmp(a->Name, b->Name)); break;
|
||||
default: IM_ASSERT(0); break;
|
||||
}
|
||||
if (delta < 0)
|
||||
return -1 * sort_spec->SortSign;
|
||||
if (delta > 0)
|
||||
return +1 * sort_spec->SortSign;
|
||||
return (sort_spec->SortDirection == ImGuiSortDirection_Ascending) ? +1 : -1;
|
||||
if (delta < 0)
|
||||
return (sort_spec->SortDirection == ImGuiSortDirection_Ascending) ? -1 : +1;
|
||||
}
|
||||
|
||||
// qsort() is instable so always return a way to differenciate items.
|
||||
|
Reference in New Issue
Block a user