[Summary] Fixed issue with enormous growth of track's height when drop pointer above the track during resizing

[Details] Issue: 43068
This commit is contained in:
GZharun 2014-09-16 18:11:57 +03:00
parent f02f647631
commit d3817d8f04

View file

@ -4829,14 +4829,33 @@ Editor::add_to_idle_resize (TimeAxisView* view, int32_t h)
bool
Editor::idle_resize ()
{
_pending_resize_view->idle_resize (_pending_resize_view->current_height() + _pending_resize_amount);
int32_t minimal_height = _pending_resize_view->preset_height (HeightSmall);
// could be negative at first
int32_t new_height = _pending_resize_view->current_height() + _pending_resize_amount;
// if the result height would be negative - set trakc header height to minimal
if ( new_height < minimal_height ) {
new_height = minimal_height;
}
_pending_resize_view->idle_resize (new_height);
if (dynamic_cast<AutomationTimeAxisView*> (_pending_resize_view) == 0 &&
selection->tracks.contains (_pending_resize_view)) {
for (TrackViewList::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) {
if (*i != _pending_resize_view) {
(*i)->idle_resize ((*i)->current_height() + _pending_resize_amount);
minimal_height = (*i)->preset_height (HeightSmall);
new_height = (*i)->current_height() + _pending_resize_amount;
// if the result height would be negative - set trakc header height to minimal
if ( new_height < minimal_height ) {
new_height = minimal_height;
}
(*i)->idle_resize (new_height);
}
}
}