comparison layer/TimeInstantLayer.cpp @ 255:e175ade2d6b0

* double-click in navigate mode relocates the centre frame (closing #1734854)
author Chris Cannam
date Wed, 13 Jun 2007 09:19:33 +0000
parents 28c8e8e3c537
children cd2492c5fe45
comparison
equal deleted inserted replaced
254:a2ae3d93c645 255:e175ade2d6b0
589 } 589 }
590 m_editingCommand = 0; 590 m_editingCommand = 0;
591 m_editing = false; 591 m_editing = false;
592 } 592 }
593 593
594 void 594 bool
595 TimeInstantLayer::editOpen(View *v, QMouseEvent *e) 595 TimeInstantLayer::editOpen(View *v, QMouseEvent *e)
596 { 596 {
597 if (!m_model) return; 597 if (!m_model) return false;
598 598
599 SparseOneDimensionalModel::PointList points = getLocalPoints(v, e->x()); 599 SparseOneDimensionalModel::PointList points = getLocalPoints(v, e->x());
600 if (points.empty()) return; 600 if (points.empty()) return false;
601 601
602 SparseOneDimensionalModel::Point point = *points.begin(); 602 SparseOneDimensionalModel::Point point = *points.begin();
603 603
604 ItemEditDialog *dialog = new ItemEditDialog 604 ItemEditDialog *dialog = new ItemEditDialog
605 (m_model->getSampleRate(), 605 (m_model->getSampleRate(),
621 command->addPoint(newPoint); 621 command->addPoint(newPoint);
622 command->finish(); 622 command->finish();
623 } 623 }
624 624
625 delete dialog; 625 delete dialog;
626 return true;
626 } 627 }
627 628
628 void 629 void
629 TimeInstantLayer::moveSelection(Selection s, size_t newStartFrame) 630 TimeInstantLayer::moveSelection(Selection s, size_t newStartFrame)
630 { 631 {