Skip to content

Commit

Permalink
Fix BB Editor project load
Browse files Browse the repository at this point in the history
Closes LMMS#1621
  • Loading branch information
lukas-w authored and mohamed--abdel-maksoud committed Feb 3, 2015
1 parent 0a2a773 commit 9ddc5b4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 22 deletions.
8 changes: 4 additions & 4 deletions include/BBEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ public slots:
void play();
void stop();

protected:
virtual void closeEvent( QCloseEvent * _ce );

private:
BBTrackContainerView* m_trackContainerView;
ComboBox * m_bbComboBox;
Expand All @@ -80,13 +77,16 @@ class BBTrackContainerView : public TrackContainerView

void removeBBView(int bb);

void saveSettings(QDomDocument& doc, QDomElement& element);
void loadSettings(const QDomElement& element);

public slots:
void addSteps();
void removeSteps();
void addAutomationTrack();

protected slots:
virtual void dropEvent(QDropEvent * de );
void dropEvent(QDropEvent * de );
void updatePosition();

private:
Expand Down
30 changes: 12 additions & 18 deletions src/gui/editors/BBEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,6 @@ void BBEditor::stop()





BBTrackContainerView::BBTrackContainerView(BBTrackContainer* tc) :
TrackContainerView(tc),
m_bbtc(tc)
Expand All @@ -168,8 +166,6 @@ BBTrackContainerView::BBTrackContainerView(BBTrackContainer* tc) :





void BBTrackContainerView::addSteps()
{
TrackContainer::TrackList tl = model()->tracks();
Expand Down Expand Up @@ -224,6 +220,18 @@ void BBTrackContainerView::removeBBView(int bb)



void BBTrackContainerView::saveSettings(QDomDocument& doc, QDomElement& element)
{
MainWindow::saveWidgetState(parentWidget(), element);
}

void BBTrackContainerView::loadSettings(const QDomElement& element)
{
MainWindow::restoreWidgetState(parentWidget(), element);
}




void BBTrackContainerView::dropEvent(QDropEvent* de)
{
Expand Down Expand Up @@ -254,17 +262,3 @@ void BBTrackContainerView::updatePosition()
//realignTracks();
emit positionChanged( m_currentPosition );
}

void BBEditor::closeEvent( QCloseEvent * _ce )
{
if( parentWidget() )
{
parentWidget()->hide();
}
else
{
hide();
}
_ce->ignore();
}

0 comments on commit 9ddc5b4

Please sign in to comment.