Commit 1260e620 authored by CABEL Tristan's avatar CABEL Tristan

start a drag on a dataManagerItem only when leftButton is pressed

parent e21df12e
......@@ -37,6 +37,7 @@ dtkWidgetsDataManagerPrivate::dtkWidgetsDataManagerPrivate(QWidget *parent) : QS
this->setWidget(this->contents);
this->setWidgetResizable(true);
this->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
}
dtkWidgetsDataManagerPrivate::~dtkWidgetsDataManagerPrivate(void)
......@@ -46,7 +47,7 @@ dtkWidgetsDataManagerPrivate::~dtkWidgetsDataManagerPrivate(void)
QSize dtkWidgetsDataManagerPrivate::sizeHint(void) const
{
return QSize(200, 130);
return QSize(200, 120);
}
dtkWidgetsDataManagerItem *dtkWidgetsDataManagerPrivate::create(dtkWidgetsDataManagerDataPtr data_serie, const QColor &color, const QImage &img)
......@@ -202,7 +203,7 @@ dtkWidgetsDataManager::~dtkWidgetsDataManager(void)
QSize dtkWidgetsDataManager::sizeHint(void) const
{
return QSize(200, 140);
return QSize(200, 120);
}
void dtkWidgetsDataManager::present(dtkWidgetsDataManagerItem *item)
......
......@@ -108,6 +108,9 @@ void dtkWidgetsDataManagerItem::leaveEvent(QEvent *) {
void dtkWidgetsDataManagerItem::mouseMoveEvent(QMouseEvent *event)
{
if (!(event->buttons() & Qt::LeftButton))
return;
QMimeData *mimeData = new QMimeData;
mimeData->setText(QString(":%1").arg(this->id));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment