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:
regulus79
2025-05-04 16:42:43 -04:00
committed by GitHub
parent 06d897bc4d
commit 61736a97b6
4 changed files with 4 additions and 4 deletions

View File

@@ -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();

View File

@@ -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())
{

View File

@@ -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"))
{

View File

@@ -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();