Uh oh!
There was an error while loading. Please reload this page.
MapFindFeature: Exclude hidden and protected objects - #2371
Conversation
The 'Find next' search failed if the object query returned an object with either a hidden or protected symbol since these kind of objects can't be added to an object selection. Exclude all hidden and protected objects from the 'Find next' and 'Find all' search.
Uh oh!
There was an error while loading. Please reload this page.
dl3sdo
commented
Apr 27, 2025
For the 'Find all' mechanism the hidden and protected objects were just ignored when adding to the object selection, whereas for the 'Find next' mechanism the outcome depended on the internal order of the objects: FindObjects_Issue2371.mp4 |
dg0yt
commented
Apr 27, 2025
Yeah, I got the problem. I'm a little bit slow with reviewing the changes 🙈 |
Made It is a little bit irritating that objects with protected symbols are skipped. But this can't be changed easily now. The PR is an improvements nevertheless. |
Uh oh!
There was an error while loading. Please reload this page.
dl3sdo
commented
May 12, 2025
@dg0yt: adding the |
| } | ||
| }; | ||
| map->getCurrentPart()->applyOnMatchingObjects(search, std::cref(query)); | ||
| map->getCurrentPart()->applyOnAllObjects(search); |
There was a problem hiding this comment.
Reverting part of my change here: The current object might no longer match the query, but we still want to see it when determining the next match.
dl3sdo
commented
May 13, 2025
@dg0yt: I'm adding a test case. |
dg0yt
commented
May 13, 2025
I will probably revert most of b0dcb5a. |
dl3sdo
commented
May 13, 2025
I decided to not create another separate file but to add the test case to |
No slot markup, member functions are good enough. No const on functions which hand out non-const member. Restore original order in header which matched order in source. Move the new functions for testing purpose from public to protected. The test can access them via light-weight derived type.
dl3sdo
commented
May 14, 2025
Thank you Kai for refactoring my test code! BTW: tools_t.cpp was the file I also had in mind to put the test in and from which I tried to take over some code. |
dg0yt
commented
May 14, 2025
The last commit is the result of being forced into refactoring... We can make the testable functions public because they only need the controller and query, not the object state. (They might be member functions of controller, but you know ... I don't want to add more capabilities to that class.) |
dl3sdo
commented
May 14, 2025
@dg0yt: I checked the code once more and everything looks good to me. I really like the clear structure and especially the |
There is a status message, but it hardly visible at the moment.
dg0yt
commented
May 14, 2025
A few more twists. |
I tested the final version and reviewed the code once again, everything now really looks good and works as intended. Thank you Kai for spending the effort. |
dg0yt
commented
May 17, 2025
This entry is for searching with the dialog hiding parts of the map. There used to be also shortcuts IIRC. |
dg0yt
commented
May 17, 2025
Thanks Matthias. |
The 'Find next' search failed if the object query returned an object with either a hidden or protected symbol since these kind of objects can't be added to an object selection.
Exclude all hidden and protected objects from the 'Find next' and 'Find all' search.