Skip to content

Conversation

@allejok96
Copy link

  • Fixes bug where new instruments would not have LCD hidden in compact mode.
  • Fixes bug where mouse cursor gets stuck in resize mode between track controls.
  • Move common code in SongEditor and PatternEditor to TrackContainerView.
  • Restore track head size on project reload.
  • Resize track head in Pattern Editor when the windows is resized bigger again.
  • Allow resizing tracks in the track content area.

One problem is that the new ResizeTrackLine doesn't propagate selection/right click though to the widget below. Possible solutions: don't draw the resize line over the TrackContentWidget. Or hack up something like:

ResizeTrackLine::mousePressEvent(QMouseEvent* event)
{
    QMouseEvent newEvent(event->type(), newRelativePos, ...);
    QApplication::sendEvent(trackContentWidget, &newEvent);
}

@regulus79
Copy link
Owner

I notice this PR seems to do a bit more refactoring than what is directly related to resizing the tracks. But I do like how much cleaner everything is, thanks!

{
// TODO we should propagate right clicks and ctrl+drag to the TrackContentWidget
// instead of just silently ignoring it here
if (me->button() != Qt::LeftButton || me->modifiers()) { return; }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would doing me->ignore(); return; work?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it and it doesn't work. I don't think mouse press events can propagate to the parent, but even if they did it wouldn't work because TrackContentWidget is a nephew to TrackResizeLine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants