-
-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto Sort labels bug and other label handling issues #5630
Conversation
This is now ready for review. |
Ok Ive added a fix already for the autosort not being stored: 0054568 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some questions on the code and have the feeling you are changing quite a few things for little gain.
Maybe we can have a look together next week when you are back?
|
||
public: | ||
static Column * addColumn(DataSet* data, int index = -1, const std::string & name = "", columnType colType = columnType::scale, computedColumnType computedType = computedColumnType::notComputed, bool alterDataSetTable = true); | ||
static Column * loadColumn(DataSet* data, int index); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function obviously should be on DataSet
...
for(Label * label : _labels) | ||
doublevec asc = valuesNumericOrdered(); | ||
|
||
if (asc.empty()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So with this change it either orders the numeric ones or the non-numerics if there are no numerics?
Why not order both?
lets talk about this tomorrow |
b9cd386
to
cf390e2
Compare
3eaa51a
to
5d711af
Compare
5d711af
to
562ec64
Compare
visible: !columnModel.autoSort || columnModel.rowsTotal - columnModel.firstNonNumericRow > 1 //If there are at least 2 non numerics there is something to reverse | ||
|
||
visible: !columnModel.autoSort | ||
enabled: columnModel.rowCount() > 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dont use rowCount() in a binding because it wont update on changes...
All those changes to column, dataset and databaseinterface seem to be useless and change the logic in a bunch of places. |
This solves several issues: