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

Implement copying and pasting in the SliceView #162

Merged
merged 2 commits into from
May 11, 2018

Conversation

nickfong
Copy link
Contributor

Enable copying and pasting in the SliceView. When the select tool is selected, copying a VH or group of VHs copies the VH(s) to a buffer and shows a preview of what the pasted VHs will look like.

Pasting ensures that the VHs are pasted in the correct position for their parity. Furthermore, pasting (either via clicking or via the context menu) is disabled if pasting would be illegal (i.e. if pasting would result in a VH being placed on top of another VH).

This PR includes changes made in #156. It also includes a commit from #161 as these changes build on changes in #161.

@sdouglas
Copy link
Contributor

sdouglas commented Mar 1, 2018

Will review once #161 is fixed

assert isinstance(offset, (tuple, list)) or offset is None
assert isinstance(use_undostack, bool)

print('Importing to part where use_undostack is %s' % use_undostack)
Copy link
Contributor

Choose a reason for hiding this comment

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

need to remove

# print('and to here')
# import traceback
# traceback.print_stack()
print('done redoing create of %s' % self.id_num)
Copy link
Contributor

Choose a reason for hiding this comment

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

another residual print statement

@grinner
Copy link
Contributor

grinner commented Mar 27, 2018

I have a version that works in the gridview for C+P. We should do it in that style. Keyboard short cuts and a context menu. please add your thoughts to that which in now merged into develop as of PR 165. We might consider closing this and porting the code or figuring out a code re-use strategy for it.

@grinner
Copy link
Contributor

grinner commented Apr 30, 2018

Since this is tagged DO NOT MERGE Should we close this?

@nickfong nickfong changed the base branch from develop to abstract-view-engine April 30, 2018 20:01
@nickfong
Copy link
Contributor Author

I tagged this to hold off on merging this so that other PRs could be merged "in order" to avoid merge conflicts – and because the base of this PR needed to be updated to merge into abstract-view-engine (I've just done this)

If the consensus is that we'd rather not have other PRs open, feel free to close this and I'll reopen or create another PR once the other PRs are merged!

nickfong added 2 commits May 11, 2018 12:34
Enable copying and pasting in the SliceView.  When the select tool is
selected, copying a VH or group of VHs copies the VH(s) to a buffer and
shows a preview of what the pasted VHs will look like.

Pasting ensures that the VHs are pasted in the correct position for
their parity.  Furthermore, pasting (either via clicking or via the
context menu) is disabled if pasting would be illegal (i.e. if pasting
would result in a VH being placed on top of another VH).
Add lattice coordinates to coordinates_to_vhid so that conflicting VHs
can be detected
@nickfong
Copy link
Contributor Author

Hi @grinner and @sdouglas,

This is ready to be reviewed; branch has been rebased off of the most recent abstract-view-engine

Thanks

@grinner grinner merged commit 8daf824 into cadnano:abstract-view-engine May 11, 2018
@nickfong nickfong deleted the nbf/vh-copy-paste branch May 17, 2018 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants