Skip to content

Fix model reordering in Constrained Fitting widget#3857

Merged
krzywon merged 1 commit intomainfrom
3856-dragging-fit-pages
Feb 10, 2026
Merged

Fix model reordering in Constrained Fitting widget#3857
krzywon merged 1 commit intomainfrom
3856-dragging-fit-pages

Conversation

@rozyczko
Copy link
Copy Markdown
Member

@rozyczko rozyczko commented Feb 3, 2026

Description

self.model().flags(index) returns a Qt ItemFlag/ItemFlags object, which cannot be passed to int() — that caused the TypeError. Testing the flag via flags & QtCore.Qt.ItemIsDropEnabled and converting to bool avoids the error and is the correct bitmask check.

Fixes #3856

How Has This Been Tested?

Local win11 test

Review Checklist:

[if using the editor, use [x] in place of [ ] to check a box]

Documentation (check at least one)

  • There is nothing that needs documenting
  • Documentation changes are in this PR
  • There is an issue open for the documentation (link?)

Installers

  • There is a chance this will affect the installers, if so
    • Windows installer (GH artifact) has been tested (installed and worked)
    • MacOSX installer (GH artifact) has been tested (installed and worked)
    • Wheels installer (GH artifact) has been tested (installed and worked)

Licensing (untick if necessary)

  • The introduced changes comply with SasView license (BSD 3-Clause)

Copy link
Copy Markdown
Contributor

@krzywon krzywon left a comment

Choose a reason for hiding this comment

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

Tested and this seems to fix the drag/drop issue

@krzywon
Copy link
Copy Markdown
Contributor

krzywon commented Feb 4, 2026

@wpotrzebowski - please give this a review when you are able.

Copy link
Copy Markdown
Contributor

@wpotrzebowski wpotrzebowski left a comment

Choose a reason for hiding this comment

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

It seems to work as expected. No error has been thrown while trying to rearrange the table. I've managed, however to drag model name e.g. M3 to the data explorer. I think this may be a seprate issue though`

@wpotrzebowski
Copy link
Copy Markdown
Contributor

Screenshot 2026-02-10 at 15 30 28

@wpotrzebowski
Copy link
Copy Markdown
Contributor

Shouldn't be that merged against release-6.1.3 (instead of main)

@krzywon
Copy link
Copy Markdown
Contributor

krzywon commented Feb 10, 2026

Shouldn't be that merged against release-6.1.3 (instead of main)

I've been cherry-picking changes not directly made to the release branch.

@krzywon krzywon merged commit 874584c into main Feb 10, 2026
48 checks passed
@krzywon krzywon deleted the 3856-dragging-fit-pages branch February 10, 2026 15:24
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.

Dragging Fit Pages in Constrained Fit Window Throws Error

3 participants