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

Action List Selection #170

Closed
egofree71 opened this Issue Nov 11, 2014 · 7 comments

Comments

Projects
None yet
4 participants
@egofree71
Collaborator

egofree71 commented Nov 11, 2014

If you are doing a copy and several pastes one after the other in the actions list, all actions remain selected.

@RobertBColton

This comment has been minimized.

Show comment
Hide comment
@RobertBColton

RobertBColton Nov 26, 2014

Collaborator

@this was fixed in the last update, the real issue now is maintaining selection when moving the actions, even though Studio doesn't.

Collaborator

RobertBColton commented Nov 26, 2014

@this was fixed in the last update, the real issue now is maintaining selection when moving the actions, even though Studio doesn't.

@RobertBColton RobertBColton changed the title from Issue with copy and paste in the actions list to Action List Selection Nov 26, 2014

@JoshDreamland

This comment has been minimized.

Show comment
Hide comment
@JoshDreamland

JoshDreamland Apr 8, 2016

I personally like having things I paste be selected. If pasting twice selects both pastes, that sounds aggravating, though; a paste should clear the original selection, if it's not erasing it.

JoshDreamland commented Apr 8, 2016

I personally like having things I paste be selected. If pasting twice selects both pastes, that sounds aggravating, though; a paste should clear the original selection, if it's not erasing it.

@RobertBColton

This comment has been minimized.

Show comment
Hide comment
@RobertBColton

RobertBColton Apr 8, 2016

Collaborator

Rusky thinks it's less normal and unusual to maintain the selection for paste but I still think I disagree. The reason being that "Insert Image" in almost any rich text editor will keep the image selected so you can move it around. So far this is all working just fine in master and the bug originally reported by egofree has been fixed, the old selection is replaced with the new selection in a paste now as I also feel it should be. I should note that GMS does it the way master currently works where when you paste it inserts directly before the selected action or appends to the end if none is selected.

<Rusky> 1) that's not paste 2) ms word has a cursor 3) even if it does select on paste it's still better to be able to be precise about where you paste
<Rusky> so regardless of what you do there, let me paste after the end and before the beginning without moving after the paste
<Rusky> annnnnnd good night
<Rusky> for real

I think what @rpjohnst is suggesting is something along the lines of a text editor like cursor that would always be active for the list. I feel that this would be even weirder and less common as I've never seen such a thing on any list control in a GUI framework before and can not currently find any way of doing so in Swing.

Collaborator

RobertBColton commented Apr 8, 2016

Rusky thinks it's less normal and unusual to maintain the selection for paste but I still think I disagree. The reason being that "Insert Image" in almost any rich text editor will keep the image selected so you can move it around. So far this is all working just fine in master and the bug originally reported by egofree has been fixed, the old selection is replaced with the new selection in a paste now as I also feel it should be. I should note that GMS does it the way master currently works where when you paste it inserts directly before the selected action or appends to the end if none is selected.

<Rusky> 1) that's not paste 2) ms word has a cursor 3) even if it does select on paste it's still better to be able to be precise about where you paste
<Rusky> so regardless of what you do there, let me paste after the end and before the beginning without moving after the paste
<Rusky> annnnnnd good night
<Rusky> for real

I think what @rpjohnst is suggesting is something along the lines of a text editor like cursor that would always be active for the list. I feel that this would be even weirder and less common as I've never seen such a thing on any list control in a GUI framework before and can not currently find any way of doing so in Swing.

@RobertBColton

This comment has been minimized.

Show comment
Hide comment
@RobertBColton

RobertBColton Apr 8, 2016

Collaborator

In lgm16b4 there is a paste operation using the built-in action for CTRL-V that comes with the default transfer handler used on ActionList. This paste operation always appends to the end because it does not use the selected index when the import is not a drop (https://github.com/IsmAvatar/LateralGM/blob/stable/org/lateralgm/components/ActionList.java#L527). This is correctly accounted for in master.

The Swing framework's built in paste operation does in fact maintain the selection as well, of everything pasted. Also to quote an Oracle Java tutorial:
https://docs.oracle.com/javase/tutorial/uiswing/dnd/listpaste.html

Finally, you have to decide how to handle the paste. In the case of a drag and drop, you insert the data at the drop location. In the case of a paste, you do not have the benefit of the user pointing to the desired paste location. You need to decide what makes sense for your application — inserting the data before or after the current selection might be the best solution.

So I will go with this approach for stable and for master.

Collaborator

RobertBColton commented Apr 8, 2016

In lgm16b4 there is a paste operation using the built-in action for CTRL-V that comes with the default transfer handler used on ActionList. This paste operation always appends to the end because it does not use the selected index when the import is not a drop (https://github.com/IsmAvatar/LateralGM/blob/stable/org/lateralgm/components/ActionList.java#L527). This is correctly accounted for in master.

The Swing framework's built in paste operation does in fact maintain the selection as well, of everything pasted. Also to quote an Oracle Java tutorial:
https://docs.oracle.com/javase/tutorial/uiswing/dnd/listpaste.html

Finally, you have to decide how to handle the paste. In the case of a drag and drop, you insert the data at the drop location. In the case of a paste, you do not have the benefit of the user pointing to the desired paste location. You need to decide what makes sense for your application — inserting the data before or after the current selection might be the best solution.

So I will go with this approach for stable and for master.

@rpjohnst

This comment has been minimized.

Show comment
Hide comment
@rpjohnst

rpjohnst Apr 8, 2016

Contributor

Inserting before the selection or appending on no selection accomplishes what I described, without a weird vertical cursor.

Contributor

rpjohnst commented Apr 8, 2016

Inserting before the selection or appending on no selection accomplishes what I described, without a weird vertical cursor.

@RobertBColton

This comment has been minimized.

Show comment
Hide comment
@RobertBColton

RobertBColton Apr 9, 2016

Collaborator

Sigh, thank you, now I know that the current implementation is in fact correct. Another aspect of this to mention real quick too is that if you hold CTRL while dragging, when you drop it will COPY instead of MOVE. I totally forgot about that too. Everything seems to working great now.

Collaborator

RobertBColton commented Apr 9, 2016

Sigh, thank you, now I know that the current implementation is in fact correct. Another aspect of this to mention real quick too is that if you hold CTRL while dragging, when you drop it will COPY instead of MOVE. I totally forgot about that too. Everything seems to working great now.

@RobertBColton

This comment has been minimized.

Show comment
Hide comment
@RobertBColton

RobertBColton Apr 13, 2016

Collaborator

This is fully corrected now in master and stable.

Collaborator

RobertBColton commented Apr 13, 2016

This is fully corrected now in master and stable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment