Bug #1063
- Fixed bug #1063, so that numeric UDA fields are now sortable (thanks to Max Muller).
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <stdlib.h>
|
||||
#include <Context.h>
|
||||
#include <Duration.h>
|
||||
#include <Task.h>
|
||||
@@ -231,8 +232,8 @@ static bool sort_compare (int left, int right)
|
||||
std::string type = column->type ();
|
||||
if (type == "numeric")
|
||||
{
|
||||
left_real = (*global_data)[left].urgency ();
|
||||
right_real = (*global_data)[right].urgency ();
|
||||
const float left_real = strtof (((*global_data)[left].get_ref (field)).c_str (), NULL);
|
||||
const float right_real = strtof (((*global_data)[right].get_ref (field)).c_str (), NULL);
|
||||
|
||||
if (left_real == right_real)
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user