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

gui: Add Copy command feature on right-click to GUI History panel #4927

Merged
merged 2 commits into from
Jan 10, 2025

Conversation

aniket2405
Copy link
Contributor

@aniket2405 aniket2405 commented Jan 8, 2025

Description:

Provide Copy command feature on right-click for commands in the GUI History panel.

Motivation and context:

For reporting bugs it's helpful to copy particular commands from history. Presently, there is just the Remove command.

How has this been tested?

Compiled and executed the Grass application locally. Can observe the new Copy command in the History Panel on right-clicking a command.

Screenshots (if appropriate)

image

image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing
    functionality to not work as before)

Checklist

  • PR title provides summary of the changes and starts with one of the
    pre-defined prefixes
  • My code follows the code style
    of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

Fixes

#4385

@github-actions github-actions bot added GUI wxGUI related Python Related code is in Python labels Jan 8, 2025
@echoix
Copy link
Member

echoix commented Jan 8, 2025

@petrasovaa is there a way that exists to paste back and use a command like that? Does a json representation bring value? (In QGIS you can copy and paste the command run to populate the box again, using a json format).

@petrasovaa
Copy link
Contributor

@petrasovaa is there a way that exists to paste back and use a command like that? Does a json representation bring value? (In QGIS you can copy and paste the command run to populate the box again, using a json format).

Not sure I understand, something like the --ui ?

@echoix
Copy link
Member

echoix commented Jan 8, 2025

@petrasovaa is there a way that exists to paste back and use a command like that? Does a json representation bring value? (In QGIS you can copy and paste the command run to populate the box again, using a json format).

Not sure I understand, something like the --ui ?

For the history as json part, I assume it's available as this pending PR fixes when a comment is multiple lines #4216.
I'm wondering if copying here allows it to be used somewhere useful after that, or we would be better off to copy as json. If we copy as json, is there also a way to use that json somewhere?

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@echoix echoix linked an issue Jan 9, 2025 that may be closed by this pull request
@aniket2405
Copy link
Contributor Author

@echoix, thanks for updating my pull request with the required change.
Are there any suggestions for this PR, or can we move forward and merge this?

Copy link
Member

@echoix echoix left a comment

Choose a reason for hiding this comment

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

I wanted to let the chance to get some responses, or for others to take a look at it if they objected. But I'm pretty sure it's cortect as is, and I spot checked a couple of wx calls to make sure their usage was fine, and "TheClipboard" seems fine and similar to how it's used elsewhere.

So, let's continue with it, it was well described in the PR description.

@echoix echoix merged commit f11fc00 into OSGeo:main Jan 10, 2025
26 checks passed
@github-actions github-actions bot added this to the 8.5.0 milestone Jan 10, 2025
@aniket2405
Copy link
Contributor Author

Thanks for the quick feedback and for merging this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI wxGUI related Python Related code is in Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feat] Add Copy command to GUI History panel
3 participants