mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-04-17 06:32:36 +02:00
2019-12-31 Fred Gleason <fredg@paravelsystems.com>
* Tweaked the 'LogLineBox::mouseMoveEvent()' method in rdairplay(1) to require a cursor movement of at least 20 pixels before generating a cart drag.
This commit is contained in:
parent
e3dd3ef7a3
commit
4c48bc1b52
@ -19375,3 +19375,7 @@
|
||||
* Added a work-around in the 'PyPAD.Receiver().__openDb()' method
|
||||
to work with versions of MySQLdb that do not support the
|
||||
'password=' parameter in 'MySQLdb.connect()'.
|
||||
2019-12-31 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Tweaked the 'LogLineBox::mouseMoveEvent()' method in rdairplay(1)
|
||||
to require a cursor movement of at least 20 pixels before generating
|
||||
a cart drag.
|
||||
|
@ -783,20 +783,25 @@ void LogLineBox::mousePressEvent(QMouseEvent *e)
|
||||
{
|
||||
QWidget::mousePressEvent(e);
|
||||
line_move_count=3;
|
||||
line_drag_start_pos=e->pos();
|
||||
}
|
||||
|
||||
|
||||
void LogLineBox::mouseMoveEvent(QMouseEvent *e)
|
||||
{
|
||||
QWidget::mouseMoveEvent(e);
|
||||
line_move_count--;
|
||||
if(line_move_count==0) {
|
||||
if(line_allow_drags&&(line_logline!=NULL)) {
|
||||
RDCartDrag *d=
|
||||
new RDCartDrag(line_logline->cartNumber(),line_icon_label->pixmap(),
|
||||
line_group_label->palette().
|
||||
color(QColorGroup::Foreground),this);
|
||||
d->dragCopy();
|
||||
|
||||
if((e->pos()-line_drag_start_pos).manhattanLength()>
|
||||
LOGLINEBOX_DRAG_THRESHOLD) {
|
||||
line_move_count--;
|
||||
if(line_move_count==0) {
|
||||
if(line_allow_drags&&(line_logline!=NULL)) {
|
||||
RDCartDrag *d=
|
||||
new RDCartDrag(line_logline->cartNumber(),line_icon_label->pixmap(),
|
||||
line_group_label->palette().
|
||||
color(QColorGroup::Foreground),this);
|
||||
d->dragCopy();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -805,6 +810,7 @@ void LogLineBox::mouseMoveEvent(QMouseEvent *e)
|
||||
void LogLineBox::mouseReleaseEvent(QMouseEvent *e)
|
||||
{
|
||||
line_move_count=-1;
|
||||
line_drag_start_pos=QPoint();
|
||||
}
|
||||
|
||||
|
||||
|
@ -37,6 +37,7 @@
|
||||
//
|
||||
#define LOGLINEBOX_FULL_HEIGHT 85
|
||||
#define LOGLINEBOX_HALF_HEIGHT 50
|
||||
#define LOGLINEBOX_DRAG_THRESHOLD 20
|
||||
|
||||
class LogLineBox : public RDWidget
|
||||
{
|
||||
@ -127,6 +128,7 @@ class LogLineBox : public RDWidget
|
||||
QPixmap *line_traffic_map;
|
||||
QPixmap *line_music_map;
|
||||
int line_move_count;
|
||||
QPoint line_drag_start_pos;
|
||||
RDLogLine::Status line_status;
|
||||
QString line_title_template;
|
||||
QString line_artist_template;
|
||||
|
Loading…
x
Reference in New Issue
Block a user