File Editor Save Behavior

More
04 Feb 2021 23:28 #197695 by snowgoer540
I'm not sure if this recently changed or I just now noticed it, but there is some odd behavior around saving a file when a file that starts with the same letter already exists in the directory. It will bring up a guess in case you want to save as the same file name, which requires you to click back into the filename field to keep typing. The next letter pressed does the same thing. So if you have a file that is named TEST and you wanted to type out TEST2, you would have to click back in the field after each letter.

Also, during this time, the save dialog loses keyboard focus, so pressing up or down on the keyboard jogs the axis. I dont think that would be the intent?

Lastly, I don't want to speak for everyone, but I would find it convenient if I was editing an already opened file, when I clicked Save if that file name was pre-populated. I could easily tack on a _1 or whatever if I wanted, or simply save over the file without any further clicking or typing. Just a suggestion.

Please Log in or Create an account to join the conversation.

More
05 Feb 2021 08:24 #197709 by cmorley
Replied by cmorley on topic File Editor Save Behavior
Ill look into it when I'm back from work.
The following user(s) said Thank You: snowgoer540

Please Log in or Create an account to join the conversation.

More
07 Feb 2021 05:04 - 07 Feb 2021 05:06 #197889 by cmorley
Replied by cmorley on topic File Editor Save Behavior
looked into this - another keybindings problem.

try this in the handler file:
It seems to work but i haven't tested everything.
Trying to find something better.
        if event.isAutoRepeat():return True
        # This part is new:
        if receiver2 == None:
            if isinstance(receiver2,receiver,QtWidgets.QListView:
                receiver.keyPressEvent(event)
                event.accept()
                return True
Last edit: 07 Feb 2021 05:06 by cmorley.

Please Log in or Create an account to join the conversation.

More
07 Feb 2021 17:35 - 07 Feb 2021 17:42 #197940 by snowgoer540

looked into this - another keybindings problem.

try this in the handler file:
It seems to work but i haven't tested everything.
Trying to find something better.
        if event.isAutoRepeat():return True
        # This part is new:
        if receiver2 == None:
            if isinstance(receiver2,receiver,QtWidgets.QListView:
                receiver.keyPressEvent(event)
                event.accept()
                return True


Thanks!

That does work (missing a ) after QListView). Only thing I see is it will not auto repeat once the "guess" drop down pops up. I would think you'd only see that if you held backspace to delete out everything you added in.

We have quite a bit of work around in that section for keyboard jogging. I have not tested whether or not the above code affects any of that.

EDIT: It does break keyboard jogging for us. If there's no other solution, Maybe I'll see if Phill can take a look. One suggestion would be to just remove the drop down where it guesses the name of the file you're typing?
Last edit: 07 Feb 2021 17:42 by snowgoer540.

Please Log in or Create an account to join the conversation.

More
08 Feb 2021 18:47 #198043 by snowgoer540
To follow up on this, Phill had me add this:
                if isinstance(receiver2, QtWidgets.QListView):
                    flag = True
                    break

in our section of:
            while receiver2 is not None and not flag:

It fixed the problem, and holding back space works to clear out the entire area, regardless of if the guess drop down is displayed or not.

Hopefully that helps you in some way.

-Greg

Please Log in or Create an account to join the conversation.

Moderators: cmorley
Time to create page: 0.168 seconds
Powered by Kunena Forum