Editing and sustain

When editing a piano track, although velocity of notes is carried with the note in question, the sustain information (input by the sustain pedal on my keyboard) doesn’t seem to be. For example, if I delete the penultimate bar of a piece and move the last bar to fill the gap I now have (by highlighting and dragging in the edit window) the sustain information for that bar will be left beyond the end of the piece and the sustain information applied to the last bar will be that of the bar I deleted. This is a real pain if you decide you need to delete a few bars at the beginning of a piece, since you then have to manually enter all the sustain information for the rest of the piece. Strikes me that this isn’t logical, so is there some flag that I haven’t set, or should I be using a different method to edit/delete and move bars around?