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

Fix some issues with Inputs editor #5942

Merged
merged 1 commit into from Jun 3, 2018

Conversation

Projects
None yet
2 participants
@mpaperno
Copy link
Member

mpaperno commented Jun 3, 2018

  • Fix "ghost" input names being left over when moving items (closes #5740);
  • Cut/paste and moving item(s) will now also copy the input name(s) in some cases (see below);
  • Clean up some code and potential crashes with out-of-range indices.

Copying the input names is a little tricky... I set it up so that in all cases it will only copy/move a name if destination input channel is nameless AND source input becomes empty after the operation. Specifically, it will (or should) not duplicate names. So if you copy/paste a line to a new channel, the name will not carry over. If you cut/paste a line and the source input channel now has no entries, the name WILL carry over (if the destination channel is nameless). Same for moving an item with move up/down or drag-move.

One noticeable side-effect is when you Cut an item, the input name will remain with the old input channel until you paste the clipboard. It actually provides a decent place marker showing where the line was cut from, so it's not too awkward. If you don't paste the cut item anywhere, then the "ghost" name will remain until that input channel is edited again.

[Companion][InputsPanel] Fix "ghost" input names being left over when…
… moving items (closes #5740); Cut/paste and drag-move will now also copy the input name if destination input is nameless and source input becomes empty (will not duplicate names); Clean up/simplify some code.

@mpaperno mpaperno added the Companion label Jun 3, 2018

@bsongis bsongis merged commit 487c0de into 2.2 Jun 3, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@bsongis bsongis deleted the mpaperno/cpn_inputs_sort branch Jun 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment