Ensure clips have auto-resizing enabled by default (#7874)
A follow up to #7477, which ensures clips have auto-resizing enabled by default. This is needed because auto-resizing was the default behavior, but the code tried to use this newly added attribute with a default of 0 (i.e., auto resizing is not enabled).
This commit is contained in:
@@ -865,7 +865,7 @@ void AutomationClip::loadSettings( const QDomElement & _this )
|
||||
"prog" ).toInt() ) );
|
||||
setTension( _this.attribute( "tens" ) );
|
||||
setMuted(_this.attribute( "mute", QString::number( false ) ).toInt() );
|
||||
setAutoResize(_this.attribute("autoresize").toInt());
|
||||
setAutoResize(_this.attribute("autoresize", "1").toInt());
|
||||
setStartTimeOffset(_this.attribute("off").toInt());
|
||||
|
||||
for( QDomNode node = _this.firstChild(); !node.isNull();
|
||||
|
||||
@@ -80,7 +80,7 @@ void PatternClip::loadSettings(const QDomElement& element)
|
||||
movePosition( element.attribute( "pos" ).toInt() );
|
||||
}
|
||||
changeLength( element.attribute( "len" ).toInt() );
|
||||
setAutoResize(element.attribute("autoresize").toInt());
|
||||
setAutoResize(element.attribute("autoresize", "1").toInt());
|
||||
setStartTimeOffset(element.attribute("off").toInt());
|
||||
if (static_cast<bool>(element.attribute("muted").toInt()) != isMuted())
|
||||
{
|
||||
|
||||
@@ -356,7 +356,7 @@ void SampleClip::loadSettings( const QDomElement & _this )
|
||||
changeLength( _this.attribute( "len" ).toInt() );
|
||||
setMuted( _this.attribute( "muted" ).toInt() );
|
||||
setStartTimeOffset( _this.attribute( "off" ).toInt() );
|
||||
setAutoResize(_this.attribute("autoresize").toInt());
|
||||
setAutoResize(_this.attribute("autoresize", "1").toInt());
|
||||
|
||||
if (_this.hasAttribute("color"))
|
||||
{
|
||||
|
||||
@@ -532,7 +532,7 @@ void MidiClip::loadSettings( const QDomElement & _this )
|
||||
changeLength(len);
|
||||
}
|
||||
|
||||
setAutoResize(_this.attribute("autoresize").toInt());
|
||||
setAutoResize(_this.attribute("autoresize", "1").toInt());
|
||||
setStartTimeOffset(_this.attribute("off").toInt());
|
||||
|
||||
emit dataChanged();
|
||||
|
||||
Reference in New Issue
Block a user