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

Clear clipboard when diagram items are copied #383

Merged
merged 1 commit into from Jul 31, 2020
Merged

Clear clipboard when diagram items are copied #383

merged 1 commit into from Jul 31, 2020

Conversation

amolenaar
Copy link
Member

@amolenaar amolenaar commented Jul 30, 2020

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Documentation content changes

What is the current behavior?

Copy /paste behavior is not intuitive when. Also it conflicts with copy/paste in the editor pane.
E.g.

  • Create a class item on the diagram
  • Copy it
  • go to the name field in the editor. Select all (ctrl-A), cut (ctrl-X) and paste (ctrl-V).
  • An item is pasted in the diagram. No change in text in the editor pane.

Issue Number: #274

What is the new behavior?

Gaphor interacts with the system clipboard. Clearing it's diagram item copy buffer when something else is copied.

For now and empty string is put on the system clipboard. This should change to an image of the copied items at some point.

Does this PR introduce a breaking change?

  • Yes
  • No

Clear copied diagram items when something is put on the clipboard.
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jul 30, 2020

Sourcery Code Quality Report (beta)

❌  Merging this PR will decrease code quality in the affected files by 0.12 out of 10.

Quality metrics Before After Change
Complexity 1.50 1.64 0.14 🔴
Method Length 32.09 36.71 4.62 🔴
Quality 9.06 8.94 -0.12 🔴
Other metrics Before After Change
Lines 94 111 17
Changed files Quality Before Quality After Quality Change
gaphor/services/copyservice.py 9.06 8.94 -0.12 🔴

Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Let us know what you think of it via email or our Gitter!

@danyeaw danyeaw added the feature A new feature label Jul 31, 2020
@danyeaw
Copy link
Member

danyeaw commented Jul 31, 2020

Nice update!

@danyeaw danyeaw merged commit 356757d into master Jul 31, 2020
@danyeaw danyeaw deleted the clipboard branch July 31, 2020 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants