You can actually just use the exact same tracker from the rectangle tool, and just make sure to modify the if statement checking for the active tool to include an ||_root.isactive==gradientrec (The || symbol stands for OR, so that the tracker is used if the rectangle tool is active or the gradient tool is active - the if statement condition is satisfied as long as its one or the other, and doesnt require both.)


