Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix track handles dissapearing #6338

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions include/TrackContainerView.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,6 @@ public slots:
protected:
static const int DEFAULT_PIXELS_PER_BAR = 16;

void resizeEvent( QResizeEvent * ) override;

TimePos m_currentPosition;


Expand Down
18 changes: 5 additions & 13 deletions src/gui/editors/TrackContainerView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,23 @@ TrackContainerView::TrackContainerView( TrackContainer * _tc ) :
m_tc->setHook( this );
//keeps the direction of the widget, undepended on the locale
setLayoutDirection( Qt::LeftToRight );

// The main layout - by default it only contains the scroll area,
// but SongEditor uses the layout to add a TimeLineWidget on top
auto layout = new QVBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing( 0 );
layout->addWidget( m_scrollArea );

// The widget that will contain all TrackViews
auto scrollContent = new QWidget;
m_scrollLayout = new QVBoxLayout( scrollContent );
m_scrollLayout->setContentsMargins(0, 0, 0, 0);
m_scrollLayout->setSpacing( 0 );
m_scrollLayout->setSizeConstraint( QLayout::SetMinAndMaxSize );

m_scrollArea->setWidget( scrollContent );
m_scrollArea->setWidgetResizable(true);

m_scrollArea->show();
m_rubberBand->hide();
Expand Down Expand Up @@ -254,10 +259,6 @@ void TrackContainerView::scrollToTrackView( TrackView * _tv )

void TrackContainerView::realignTracks()
{
m_scrollArea->widget()->setFixedWidth(width());
m_scrollArea->widget()->setFixedHeight(
m_scrollArea->widget()->minimumSizeHint().height());

for (const auto& trackView : m_trackViews)
{
trackView->show();
Expand Down Expand Up @@ -447,15 +448,6 @@ void TrackContainerView::dropEvent( QDropEvent * _de )



void TrackContainerView::resizeEvent( QResizeEvent * _re )
{
realignTracks();
QWidget::resizeEvent( _re );
}




RubberBand *TrackContainerView::rubberBand() const
{
return m_rubberBand;
Expand Down