comparison layer/NoteLayer.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
786 786
787 m_editingCommand = 0; 787 m_editingCommand = 0;
788 m_editing = false; 788 m_editing = false;
789 } 789 }
790 790
791 void 791 bool
792 NoteLayer::editOpen(View *v, QMouseEvent *e) 792 NoteLayer::editOpen(View *v, QMouseEvent *e)
793 { 793 {
794 if (!m_model) return; 794 if (!m_model) return false;
795 795
796 NoteModel::PointList points = getLocalPoints(v, e->x()); 796 NoteModel::PointList points = getLocalPoints(v, e->x());
797 if (points.empty()) return; 797 if (points.empty()) return false;
798 798
799 NoteModel::Point note = *points.begin(); 799 NoteModel::Point note = *points.begin();
800 800
801 ItemEditDialog *dialog = new ItemEditDialog 801 ItemEditDialog *dialog = new ItemEditDialog
802 (m_model->getSampleRate(), 802 (m_model->getSampleRate(),
825 command->addPoint(newNote); 825 command->addPoint(newNote);
826 command->finish(); 826 command->finish();
827 } 827 }
828 828
829 delete dialog; 829 delete dialog;
830 return true;
830 } 831 }
831 832
832 void 833 void
833 NoteLayer::moveSelection(Selection s, size_t newStartFrame) 834 NoteLayer::moveSelection(Selection s, size_t newStartFrame)
834 { 835 {