mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-23 07:06:23 +01:00
[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:
parent
f02f647631
commit
d3817d8f04
1 changed files with 21 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue