Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions plugins/audio_file_processor/audio_file_processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,17 +253,16 @@ void audioFileProcessor::loadSettings( const QDomElement & _this )
m_loopModel.loadSettings( _this, "looped" );
m_ampModel.loadSettings( _this, "amp" );
m_endPointModel.loadSettings( _this, "eframe" );
m_startPointModel.loadSettings( _this, "sframe" );

// compat code for not having a separate loopback point
if( _this.hasAttribute( "lframe" ) )
if (_this.hasAttribute("lframe") || !(_this.firstChildElement("lframe").isNull()))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If only loadSettings returned errors this could be something like:

if ( m_loopPointModel.loadSettings( _this, "lframe" ) {}
else { m_loopPointModel.loadSettings( _this, "sframe" ); }

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can simplify it more in that case.

if (!m_loopPointModel.loadSettings(_this, "lframe"))
{
	m_loopPointModel.loadSettings(_this, "sframe");
}

{
m_loopPointModel.loadSettings( _this, "lframe" );
m_startPointModel.loadSettings( _this, "sframe" );
}
else
{
m_loopPointModel.loadSettings( _this, "sframe" );
m_startPointModel.setValue( m_loopPointModel.value() );
}

m_reverseModel.loadSettings( _this, "reversed" );
Expand Down