Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
zonkmachine committed Jan 28, 2017
1 parent 8fa2c09 commit d386d4b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion include/DataFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class EXPORT DataFile : public QDomDocument
void upgrade_1_0_99();
void upgrade_1_1_0();
void upgrade_1_1_91();
void upgrade_1_2_0_rc2();
void upgrade_1_2_0_rc2_23();

void upgrade();

Expand Down
7 changes: 4 additions & 3 deletions src/core/DataFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ void DataFile::upgrade_1_1_91()
}


void DataFile::upgrade_1_2_0_rc2()
void DataFile::upgrade_1_2_0_rc2_23()
{
// Upgrade to version 1.1.92
QDomNodeList list;
Expand All @@ -913,6 +913,7 @@ void DataFile::upgrade_1_2_0_rc2()
for( int i = 0; !list.item( i ).isNull(); ++i )
{
int syncmode = el.attribute( "syncmode" ).toInt();
printf( "syncmode: %i", syncmode );
if( syncmode )
{
el = list.item( i ).toElement();
Expand Down Expand Up @@ -1008,9 +1009,9 @@ void DataFile::upgrade()
{
upgrade_1_1_91();
}
if( version < "1.2.0-rc2" )
if( version < "1.2.0-rc2.23" )
{
upgrade_1_2_0_rc2();
upgrade_1_2_0_rc2_23();
}


Expand Down
10 changes: 7 additions & 3 deletions src/core/TempoSyncKnobModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,19 @@ void TempoSyncKnobModel::loadSettings( const QDomElement & _this,
{
FloatModel::loadSettings( _this, _name );
m_custom.loadSettings( _this, _name );
// Backward compatibility with 1.2.0-rc2 and previous
if( _this.hasAttribute( _name + "_syncmode" ) )


setSyncMode( ( TempoSyncMode ) _this.attribute( _name + "_syncmode" ).toInt() );

/*if( _this.hasAttribute( _name + "_syncmode" ) )
{
setSyncMode( ( TempoSyncMode ) _this.attribute( _name + "_syncmode" ).toInt() );
}
else
{
setSyncMode( ( TempoSyncMode ) _this.attribute( "syncmode" ).toInt() );
}
}*/

}


Expand Down

0 comments on commit d386d4b

Please sign in to comment.