Page 1 of 1

External Toolbar Icon randomly changing on drop

Posted: 14 Apr 2018 02:17
by jupe
Recently I became aware that you can drag and drop on CTB's and it will run the associated left click action on the dragged files without having to script that functionality within the script, (I'd previously thought only Drop-Stack CTB worked like that) which is a cool feature, but upon starting to use that functionality I have found a random bug when using an external icon file. When I drag onto a button that has an external icon it sometimes randomly changes the icon to one of the internal XY icons, it doesn't always change it to the same icon either, in the attached image you can see that it randomly changes to the Details button, but the internal icon it changes to is also random.
It doesn't happen all the time either which is strange, it mainly does it at the start of a session, and sometimes it will take numerous repetitions to invoke the behavior, but I have seen it on multiple different XY profiles, and in fresh instances with no changes except for the addition of the CTB.
I have been hesitant to report it because this bug isn't disruptive and if you click on the button when it gets stuck on the wrong icon it changes straight back to the correct one, and its occurrence is very random so you may not want to spend any time on chasing it. Sometimes it doesn't do it, then after a while it starts doing it again, then if you click the button instead of dragging to it, it is ok for a while again, but may return later in the session.
I should add that I have only seen it happen to the first CTB from the left, but that may just be a coincidence.
XY.0112.gif
The script I am using in the screenshot is just a text runret().

Re: External Toolbar Icon randomly changing on drop

Posted: 17 Apr 2018 08:38
by admin
Tried hard, but could not yet make it happen.

You left-drag a file from the list to the toolbar within the same instance, right?
Have you been using the toolbar scroll feature before it happens?

Re: External Toolbar Icon randomly changing on drop

Posted: 17 Apr 2018 09:26
by jupe
Nope I don't have scrollable toolbar enabled, yes it is list to the toolbar in the same instance. here are a couple more GIFs I captured in the same session as the earlier one (with no config changes or toolbar buttons changed), I added progress bars to them so you can see that the button got stuck with the wrong icon on it before I started dragging, and that it switched to 2 different icons, all within the same session, it is very strange. and very random, I wouldn't invest too much time in trying to find it, I just though something may stand out initially in the code, it happens straight after the drop on the icon from the same instances file list.

Re: External Toolbar Icon randomly changing on drop

Posted: 17 Apr 2018 10:36
by admin
Happens only on drop, not on drag over?

Re: External Toolbar Icon randomly changing on drop

Posted: 17 Apr 2018 10:39
by jupe
Correct on drop, (not drag over, ever) and only on external icon source toolbar buttons that have a script left click action.

Re: External Toolbar Icon randomly changing on drop

Posted: 17 Apr 2018 10:53
by admin
I'm testing it with the following script in the button:

Code: Select all

status formatdate();
Can you make it happen with that script as well?

Re: External Toolbar Icon randomly changing on drop

Posted: 17 Apr 2018 11:19
by jupe
No I can't with that script, maybe the runret() has something to do with it?, although I just got it to happen 4 times. I dragged a few times and it didn't happen then clicked a different button to the left and then cancelled the dialog, then next try of dropping it turned into the button that I had just pressed last which was the quicksearch button.

These are the steps I can follow for it to happen, consistently:
  1. drag and drop to the button a few times and it works ok
  2. press another button to the left of it that opens a dialog (like a quicksearch button)
  3. cancel the dialog
  4. drag to it again and its icon now turns into the last pressed button. (quicksearch magnify icon in this example case)
edit: runret is irrelevant, it happens just with text "test";, I think it is just the opening of a dialog that matters, following those above steps I can invoke it now consistently.

Re: External Toolbar Icon randomly changing on drop

Posted: 17 Apr 2018 11:52
by admin
Bingo, seeing it now! :tup:

Going down to fix... :twisted:

Re: External Toolbar Icon randomly changing on drop

Posted: 17 Apr 2018 12:00
by jupe
Nice!, it must switch to the last pressed button, which is why I was seeing a heap of random ones previously, I only just figured out those repeatable steps that would make it happen regularly or I would have listed them earlier, thanks for your patience., I should have waited to figure them out before bothering you but it seemed so random until just then.

Re: External Toolbar Icon randomly changing on drop

Posted: 17 Apr 2018 12:08
by admin
Fixed. 8)

Re: External Toolbar Icon randomly changing on drop

Posted: 17 Apr 2018 12:15
by jupe
:appl:

Re: External Toolbar Icon randomly changing on drop

Posted: 24 Jun 2018 05:15
by jupe
I noticed that this issue wasn't completely fixed nearly straight away, but it has taken me until now to be able to create reproducible steps to invoke it, and I didn't want to bother you again until I had them locked down, so here are the steps:
  1. Run fresh;
  2. Add the below snippet;
  3. Press OpenWith toolbar button, select "Customize File Associations"
  4. Cancel the dialog
  5. Drag+Drop a file onto the new toolbar button created in Step 2
  6. Press Close in text() dialog.
  7. Watch the toolbar button you just dropped a file onto change to the OpenWith toolbar button when the inputselect() pops up.

Code: Select all

Snip: CTB 1
  XYplorer 19.00.0110, 24/6/18 12:32:03 PM
Action
  NewUserButton
Name
  
Icon
  
ScriptL
  text "Step 6";inputselect();
ScriptR
  
FireClick
  0
It does it with internal and external toolbar buttons, it can change into random different icons like the initial reported issue, but this is one way of getting it to turn into the OpenWith button consistently, unlike the initial reported issue this time it returns to the correct icon again on mouse over. Not that you need them, but here are some screenshots of it changing into probably the last pressed button I had used, in these following captures the middle button pictured should be an external toolbar icon, like in my original post.
clip-01-05-2018.png
clip-19_06_18_17.31.png
clip-20_06_18_06.41.png
edit: I just realized you can also make it happen using the default "Views" button dropdown (not right click) menu and the "Configure Thumbnails" item, cancel the dialog and then drop on the snippet button = button turns into Views icon.

Re: External Toolbar Icon randomly changing on drop

Posted: 25 Jun 2018 16:33
by admin
Yep, indeed. Should be fixed in next beta.

Re: External Toolbar Icon randomly changing on drop

Posted: 26 Jun 2018 00:01
by LittleBiG
I wrote this to a bug topic more than 4 years ago:
It happened again. Next time I am going to take some screenshots. I have the Recent Locations button and a user button next to each other, and the Recent button icon has changed to the user button icon. I moved my mouse pointer above the wrong icon, and I got the original Recent Locations icon back immediately.
For me the problem seemed pretty random, I couldn't write a way to reproduce. I just saw it every now and then, but never happened when I tried to call forth intentionally. It will be strange not to see it any more...

Re: External Toolbar Icon randomly changing on drop

Posted: 26 Jun 2018 03:47
by jupe
@Don: Confirmed fixed, thanks!

@LittleBiG: Yeah both these similar issues seemed very random to me too, even though it happened regularly for me, it has still taken me ages to lock down reproducible steps to force both to occur, thankfully now all is good. :D