autokey icon indicating copy to clipboard operation
autokey copied to clipboard

When you clone something, the original is still highlighted instead of the clone

Open KeronCyst opened this issue 4 years ago • 5 comments

Classification:

UI/Usability

Reproducibility:

Always

Version

AutoKey version: 0.95.10

Used GUI (Gtk, Qt, or both): GTK

Installed via: Mint's Software Manager

Linux Distribution: Mint Cinnamon

Summary

Summary of the problem.

Steps to Reproduce (if applicable)

  1. Right-click on a phrase or script in the left sidebar
  2. Click "Clone Item"

Expected Results

The clone should be instantly highlighted to start doing stuff to

Actual Results

The original remains highlighted

Notes

Sorry I suck at programming or else I'd try to help!

KeronCyst avatar Jul 23 '21 18:07 KeronCyst

+1 from me!

bjohas avatar Jul 28 '21 10:07 bjohas

I made a pull request: #604

~~However, there's a runtime issue with cloning an item that I recommend handling. I don't see an open issue with it, but a cloned object should be renamed so that it does not overwrite the original object (because it has the same name). The bug arises because each "page" uses a text buffer to identify items.~~

~~The simplest solution would be to increment the file's name with a number (as convention with other applications) immediately after this line: https://github.com/autokey/autokey/blob/develop/lib/autokey/gtkui/configwindow.py#L1194~~

~~I could open a second PR to fix the issue or I can include it in my current PR. Please advise.~~

nevarek avatar Aug 31 '21 11:08 nevarek

It already does this on the back end/file system portion tho no? When I clone an item the newer item has the same name in the autokey window but has a 1 appended to the end of the file names; Screenshot from 2021-08-31 08-05-55

sebastiansam55 avatar Aug 31 '21 12:08 sebastiansam55

Aha, the other part needs to be updated as well

nevarek avatar Aug 31 '21 12:08 nevarek

I've updated the commit to include the config window to update its selected item, so the new cloned item is the one you are editing.

nevarek avatar Aug 31 '21 12:08 nevarek