Skip to content
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

ListViewFilter: Retain selection when filtering #270

Merged
merged 2 commits into from
May 14, 2024

Conversation

VesnaT
Copy link
Contributor

@VesnaT VesnaT commented Mar 25, 2024

Issue

Fixes biolab/orange3#6768

Description of changes

The default selection corresponds to QSortFilterProxyModel.
Apply selection mapped to a source model.

Includes
  • Code changes
  • Tests
  • Documentation

@codecov-commenter
Copy link

codecov-commenter commented Mar 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.49%. Comparing base (6ddb801) to head (25afe06).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #270      +/-   ##
==========================================
- Coverage   71.72%   71.49%   -0.24%     
==========================================
  Files          34       34              
  Lines        9086     9100      +14     
==========================================
- Hits         6517     6506      -11     
- Misses       2569     2594      +25     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@janezd janezd self-assigned this Apr 12, 2024
try:
yield
finally:
signal.connect(slot, connection_type)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps blocking signals (https://doc.qt.io/qt-6/qobject.html#blockSignals) would be better the temporarily disconnecting them?

Also: search the code for def blocked(. You'll find that a similar function already exists in two other places. Perhaps we should introduce one in orange-widget-base and then (after release...) use it wherever needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or even use an existing one at

def signal_blocking(obj):

@janezd janezd merged commit 29a6da8 into biolab:master May 14, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ListViewFilter - Variable unselect while searching
3 participants