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

macro editor issue #260

Closed
tksoh opened this issue Jan 10, 2021 · 5 comments
Closed

macro editor issue #260

tksoh opened this issue Jan 10, 2021 · 5 comments

Comments

@tksoh
Copy link
Contributor

tksoh commented Jan 10, 2021

This probably has something to do with our earlier discussion #244.

Using nedit-ng version 2020.1-152-g74ab961e on master.

When I deleted a macro right above the Push Tag macro, it somehow got turned into Pop Tag. Here's the sequence:

  1. Before deleting 'tag test' macro:

2021-01-10 11_46_57-toshiba (tksoh-Satellite-L645_1 (tksoh)) - VNC Viewer

  1. After deleting 'tag test' macro. Notice the Menu Entry field and command editor now showing 'Pop Tag' , even though the list window still showing 'Find Tag"

2021-01-10 11_48_04-toshiba (tksoh-Satellite-L645_1 (tksoh)) - VNC Viewer

  1. After clicking "Apply". There are not two copy of 'Pop Tag' entries.

2021-01-10 11_48_31-toshiba (tksoh-Satellite-L645_1 (tksoh)) - VNC Viewer

@eteran
Copy link
Owner

eteran commented Jan 10, 2021

Hmm, that's a weird one for sure. Out of curiosity. Are you able to replicate it starting with a fresh config?

I ask because the previously referenced discussion was technically "cosmetic", in that the macros were not really deleted, they just weren't being displayed.

So I'm wondering if you efforts to work around that bug and recreate your macros put things in a weird state.

@eteran
Copy link
Owner

eteran commented Jan 10, 2021

OK, I think this is another "cosmetic" issue. It appears that things are just getting slightly out of sync.

I was able to reproduce what you saw (so no, it wasn't related to anything you did). But afterwards, if I clicked on another entry and then back on the one with the wrong contents, it showed the correct data.

So the issue appears to be that after a delete, it is selecting one entry, but displaying another's data. Hopefully a simple fix :)

@eteran
Copy link
Owner

eteran commented Jan 10, 2021

In fact all 3 dialogs of this type have this bug. Looking into it...

eteran added a commit that referenced this issue Jan 10, 2021
…king sure that Qt recieved the "selection" changed event

When deleting an item, the index of the selection doesn't really change (delete item ar index 3, and that item goes away, but
the selection remains at index 3). So, I've added some code to first invalidate the seleciton, then reselect the index we want.

This appears to fix the issue in all 3 dialogs of this type (Shell, Background, and Macro)
@eteran
Copy link
Owner

eteran commented Jan 10, 2021

@tksoh I think that this PR should fix that issue (in all 3 dialogs since I made them share a lot of code):

#261

@tksoh
Copy link
Contributor Author

tksoh commented Jan 10, 2021

I tested the macro editor seems to be ok now. I presume the other dialogs would be ok too ;-)

eteran added a commit that referenced this issue Jan 10, 2021
…king sure that Qt recieved the "selection" changed event (#261)

When deleting an item, the index of the selection doesn't really change (delete item ar index 3, and that item goes away, but
the selection remains at index 3). So, I've added some code to first invalidate the seleciton, then reselect the index we want.

This appears to fix the issue in all 3 dialogs of this type (Shell, Background, and Macro)
@eteran eteran closed this as completed Jan 10, 2021
1div0 pushed a commit to 1div0/nedit-ng that referenced this issue Mar 24, 2021
… of making sure that Qt recieved the "selection" changed event (eteran#261)

When deleting an item, the index of the selection doesn't really change (delete item ar index 3, and that item goes away, but
the selection remains at index 3). So, I've added some code to first invalidate the seleciton, then reselect the index we want.

This appears to fix the issue in all 3 dialogs of this type (Shell, Background, and Macro)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants