Skip to content

Commit

Permalink
Add insert/remove bar buttons in Song editor (fix #5602)
Browse files Browse the repository at this point in the history
  • Loading branch information
allejok96 authored and JohannesLorenz committed Oct 4, 2020
1 parent 783db3e commit 8939b14
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
Binary file added data/themes/default/insert_bar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/themes/default/remove_bar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions include/SongEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ protected slots:
ComboBox * m_zoomingComboBox;
ComboBox * m_snappingComboBox;
QLabel* m_snapSizeLabel;

QAction* m_insertBarAction;
QAction* m_removeBarAction;
};

#endif
7 changes: 7 additions & 0 deletions src/gui/editors/SongEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"));

Expand Down

0 comments on commit 8939b14

Please sign in to comment.