teotigraphix / Framework4Bitwig

Bitwig controller API framework extensions.
GNU Lesser General Public License v3.0
58 stars 13 forks source link

Detecting if tracks have parent group not working if first track is a group #266

Open git-moss opened 3 years ago

git-moss commented 3 years ago

To detect if the current track list is the top list, so it is not inside of a group, I use the following code:

Project proj = controllerHost.getProject ();
rootTrackGroup = proj.getRootTrackGroup ();
isTopGroup = track.createParentTrack (0, 0).createEqualsValue (rootGroup);
hasParent = isTopGroup.get ();

This works fine until the first track of the track list is a group. Then it reports that it would be inside a group.

To test use the Push 2 extension of DrivenByMoss, can also be run in the simulator: 1) Display one of the track modes (this is the case when you start the extension) 2) Create some tracks 3) Make one of the tracks a group (but not the first one!) 4) Enter the group (select it with the button under it and press the button again). 5) See that the "Up" text appears in the upper right hand of the display 6) Move up by pressing the Up button. 7) "Up" disappears since you are no longer in a group 8) Make the first track a group 9) "Up" appears but you are still on the top level, so it should not appear

git-moss commented 2 years ago

Still in 4.3 Beta 4.

git-moss commented 1 year ago

Still in 5.0.6.

abique commented 1 year ago

Add a isRootTrackGroup() bool value on the track.