Add insert/remove bar buttons in Song editor (fix #5602)

This commit is contained in:
allejok96
2020-10-03 23:01:52 +02:00
committed by Johannes Lorenz
parent 783db3e457
commit 8939b149e3
4 changed files with 10 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

View File

@@ -210,6 +210,9 @@ private:
ComboBox * m_zoomingComboBox;
ComboBox * m_snappingComboBox;
QLabel* m_snapSizeLabel;
QAction* m_insertBarAction;
QAction* m_removeBarAction;
};
#endif

View File

@@ -955,6 +955,13 @@ SongEditorWindow::SongEditorWindow(Song* song) :
DropToolBar *timeLineToolBar = addDropToolBarToTop(tr("Timeline controls"));
m_editor->m_timeLine->addToolButtons(timeLineToolBar);
DropToolBar *insertActionsToolBar = addDropToolBarToTop(tr("Bar insert controls"));
m_insertBarAction = new QAction(embed::getIconPixmap("insert_bar"), tr("Insert bar"), this);
m_removeBarAction = new QAction(embed::getIconPixmap("remove_bar"), tr("Remove bar"), this);
insertActionsToolBar->addAction( m_insertBarAction );
insertActionsToolBar->addAction( m_removeBarAction );
connect(m_insertBarAction, SIGNAL(triggered()), song, SLOT(insertBar()));
connect(m_removeBarAction, SIGNAL(triggered()), song, SLOT(removeBar()));
DropToolBar *zoomToolBar = addDropToolBarToTop(tr("Zoom controls"));