Skip to content

Fix drag and drop functionality in editor - #4003

Merged
georgweiss merged 1 commit into
ControlSystemStudio:masterfrom
rjwills28:fix_bug_drag_and_drop
Nov 2, 2026
Merged

georgweiss merged 1 commit into
ControlSystemStudio:masterfrom
rjwills28:fix_bug_drag_and_drop

Conversation

@rjwills28

Copy link
Copy Markdown
Contributor

Bug was introduced when changing the background of the scroll pane to stop flickering scroll bars- see #3972 (comment).

It was a bit of a weird one. If you had a blank/new screen then you could not drag and drop. However as soon there was a widget in the screen, you could then drag and drop within the region 0,0 and the widget. So the issue came down to the fact that the widget_pane was not being drawn out to the size of the viewport/model size.

The fix brings back the sizing listener to set the min width/ height of the widget_pane so that the background is correctly drawn to that size. Note that we only want to do this for the editor. The runtime display functions correctly and we do not want to set it's size in this listener as otherwise we will return back to flickering scroll bars.

The drag and drop also did not work prior to the above changes in the case that you changed the model width/height to a value larger than the current viewport and tried to drag on to the new area. I have also fixed that by updating the min width/height when the model size is changed.

Checklist

  • Testing:

    • The feature has automated tests
    • Tests were run
    • If not, explain how you tested your changes
  • Documentation:

    • The feature is documented
    • The documentation is up to date
    • Release notes:
      • Added an entry if the change is breaking or significant
      • Added an entry when adding a new feature

Bug was introduced when changing the background of the scroll pane
to stop flickering scroll bars.
The fix brings back the sizing listener to set the min width/ height
of the widget_pane so that the background is correctly drawn to that
size.
Drag and drop also did not work if you changed the model width/height
to a value larger than the current viewport and tried to drag on to
the new area. I have also fixed that by updating the min width/height
when the model size is changed.
@sonarqubecloud

sonarqubecloud Bot commented Nov 2, 2026

Copy link
Copy Markdown

@rjwills28

Copy link
Copy Markdown
Contributor Author

@georgweiss - see fix for drag and drop bug

@georgweiss
georgweiss merged commit c0b4d5e into ControlSystemStudio:master Nov 2, 2026
9 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.

2 participants