UX: Update selected note upon insertion of new object #12

Merged
Raymonf merged 3 commits from ux/select-on-insert into C#-master 2022-11-16 23:52:46 +03:00
Raymonf commented 2022-11-08 06:25:23 +03:00 (Migrated from github.com)

Doing this lets someone quickly delete a stray note since the last inserted note would be selected automatically, but comes with the con of moving the selection index around automatically.

I have no idea if this is desired behavior or not, but in case it's acceptable behavior I'll leave this PR here.

Doing this lets someone quickly delete a stray note since the last inserted note would be selected automatically, but comes with the con of moving the selection index around automatically. I have no idea if this is desired behavior or not, but in case it's acceptable behavior I'll leave this PR here.
yellowberryHN commented 2022-11-14 10:29:59 +03:00 (Migrated from github.com)

I personally like this idea, as it can be rather confusing to think your last placed note is the selected note when it turns out to not be.

I personally like this idea, as it can be rather confusing to think your last placed note is the selected note when it turns out to not be.
veroxzik commented 2022-11-14 16:09:30 +03:00 (Migrated from github.com)

Since all notes are reordered by measure when they are added, this does not select the most recently added note, but the physically last note. I don't believe this is intended behavior?

Since all notes are reordered by measure when they are added, this does not select the most recently added note, but the physically last note. I don't believe this is intended behavior?
Raymonf commented 2022-11-16 02:14:18 +03:00 (Migrated from github.com)

@veroxzik No idea how I missed that, should be fixed with the new commit.

I guess it's yet another O(n) call, but it's probably fine for charts in this game especially since it's just looking for a reference ¯\_(ツ)_/¯

@veroxzik No idea how I missed that, should be fixed with the new commit. I guess it's yet another O(n) call, but it's probably fine for charts in this game especially since it's just looking for a reference ¯\\_(ツ)\_/¯
yellowberryHN commented 2022-11-16 09:44:31 +03:00 (Migrated from github.com)

Fix looks good to me.

Fix looks good to me.
Sign in to join this conversation.