Annoyance: Sequencer Racks, Drag and Drop Plugins

Forums

This is an old issue. I'm sharing it, although I don't know if there's a solution.

If the rack is shorter than the number of plugins it holds, it goes haywire when dragging, to the point that they can end up in the rack below (see full GIF).

Interestingly, if you zoom height (+), the problem is mitigated (without disappearing completely), although have many more plugins than the rack height.

File attachments
Permalink

yes, an annoyance and also don't know how to solve this than just disabling drag-n-drop on those track's plugin list-boxes...

mixer's strips are ok, right?

anyway, it's just that, an annoyance :)
byee

Permalink

In mixer strips they're jumping around sometimes as well.

One possible solution would be an edit-Icon in the plugin box that opens a bigger window with more room for the plugin list.

Permalink

The user can mitigate this issue to the point where it almost never occurs.
Create a template where the zoom height allows for four plugin slots in the sequencer.

In mixer, if you use QSS Tecnico or Greyscale, the mixer has fixed-height faders, which leaves ample space for plugins, and the problem doesn't appear.

Perhaps if Qtractor changes the default track height to accommodate at least four plugins, the problem will almost disappear.

File attachments
Permalink

...default track height to accommodate at least four plugins, the problem will almost disappear.

imnsho. that's not a reasonable solution I'm afraid

rather just disable the drag operation altogether iif the plugin list-box is short enough in height, say, lesser than 2 or 3 plugin items?

but again, how often do you start dragging plugins around especially from these short (in height) list-boxes? is it worth the trouble ?

seeya

setAutoScrollMargin(5), It seems to mitigate the problem almost entirely.

qtractorPluginListView.cpp line:331

// Construcctor.
qtractorPluginListView::qtractorPluginListView ( QWidget *pParent )
	: QListWidget(pParent), m_pPluginList(nullptr), m_pClickedItem(nullptr)
{
	// Drag-and-drop stuff.
	m_dragCursor  = DragNone;
	m_dragState   = DragNone;
	m_pDragItem   = nullptr;
	m_pDropItem   = nullptr;
	m_pRubberBand = nullptr;

	// Common tiny scrollbar style stuff.
	m_pTinyScrollBarStyle = nullptr;

	// To track the current item...
	m_pCurrentItem = nullptr;

//	QListWidget::setDragEnabled(true);
	QListWidget::setAcceptDrops(true);
	QListWidget::setDropIndicatorShown(true);
	QListWidget::setAutoScroll(true);
	QListWidget::setAutoScrollMargin(5); // <----- !!! Here

It's more accurate to drag upwards than downwards... but that's already happening.

It's clear that the strange behavior is due to the scroll function.

Note:
QListWidget::setAutoScroll(false);
This eliminates the problem and allows dragging up, but not down.

File attachments

setAutoScrollMargin: It mitigates the problem, but does not solve it, it is unnecessary.

I have found a better solution, activating autoscroll only when necessary.
This seems to work.

line:356

	QListWidget::setMouseTracking(false);

line:1880

void qtractorPluginListView::dragMoveEvent ( QDragMoveEvent *pDragMoveEvent )
{

	if (canDropItem(pDragMoveEvent)) {
		if (!pDragMoveEvent->isAccepted()) {
			setAutoScroll(true); // <--- here
			pDragMoveEvent->setDropAction(Qt::MoveAction);
			pDragMoveEvent->accept();
		}
	} else {
		pDragMoveEvent->ignore();
	}
	setAutoScroll(false); // <--- here
}

The problem is caused by Qt's autoScroll functionality.

Therefore, I believe the best approach is to directly address this behavior. It also provides a bit more flexibility, or at least that's the impression I got after testing.

After testing, this is the configuration I'm most satisfied with, but of course, it's your decision.
Instead of disabling DragItem, try disabling or enabling autoScroll as I mentioned earlier:


	QListWidget::setAutoScroll(false);
	QListWidget::setAutoScrollMargin(4); // It adds more precision, so it's good to add it.

//	QListWidget::setMouseTracking(true);

void qtractorPluginListView::dragMoveEvent ( QDragMoveEvent *pDragMoveEvent )
{

	if (canDropItem(pDragMoveEvent)) {
		if (!pDragMoveEvent->isAccepted()) {
			setAutoScroll(true); // <--- here
			pDragMoveEvent->setDropAction(Qt::MoveAction);
			pDragMoveEvent->accept();
		}
	} else {
		pDragMoveEvent->ignore();
	}
	setAutoScroll(false); // <--- here
}

Thank you so much, whatever you decide, it was worth it in the end. One less thing to worry about :)

Add new comment

The content of this field is kept private and will not be shown publicly.

Markdown

  • Parses markdown and converts it to HTML.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type='1 A I'> <li> <dl> <dt> <dd> <h2 id='jump-*'> <h3 id> <h4 id> <h5 id> <h6 id> <img src alt height width> <strike> <pre> <p> <br>
  • Lines and paragraphs break automatically.

Filtered HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <b> <i> <pre> <img src alt height width> <strike>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
File attachments
Unlimited number of files can be uploaded to this field.
2 MB limit.
Allowed types: jpg jpeg gif png txt doc docx xls xlsx pdf ppt pps odt ods odp zip gz bz2 xz patch diff wav ogg flac ogv mp4 qtz.