Skip to content

Commit

Permalink
fix: offset of index related to Strata Source.
Browse files Browse the repository at this point in the history
  • Loading branch information
Trico-Everfire committed Apr 26, 2024
1 parent 7bc1151 commit 8f7e8af
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,15 +384,17 @@ void CMainWindow::compressVTFFile()
vBLayout->addWidget( label1, 0, 0, Qt::AlignLeft );

auto pVtfVersionBox = new QComboBox( this );
int setbackIndex = 1;
#ifdef CHAOS_INITIATIVE
int setbackIndex = 2;
for ( int i = 0; i <= VTF_MINOR_VERSION; i++ )
#else
for ( int i = 0; i <= 5; i++ )
#endif
{
pVtfVersionBox->addItem( QString::number( VTF_MAJOR_VERSION ) + "." + QString::number( i ), i );
}
pVtfVersionBox->setCurrentIndex( pVtfVersionBox->count() - 2 );
pVtfVersionBox->setCurrentIndex( pVtfVersionBox->count() - setbackIndex );
vBLayout->addWidget( pVtfVersionBox, 0, 1, Qt::AlignRight );

#ifdef CHAOS_INITIATIVE
Expand Down Expand Up @@ -562,15 +564,17 @@ void CMainWindow::compressVTFFolder()
vBLayout->addWidget( label1, 0, 0, Qt::AlignLeft );

auto pVtfVersionBox = new QComboBox( this );
int setbackIndex = 1;
#ifdef CHAOS_INITIATIVE
setbackIndex = 2;
for ( int i = 0; i <= VTF_MINOR_VERSION; i++ )
#else
for ( int i = 0; i <= 5; i++ )
#endif
{
pVtfVersionBox->addItem( QString::number( VTF_MAJOR_VERSION ) + "." + QString::number( i ), i );
}
pVtfVersionBox->setCurrentIndex( pVtfVersionBox->count() - 2 );
pVtfVersionBox->setCurrentIndex( pVtfVersionBox->count() - setbackIndex );
vBLayout->addWidget( pVtfVersionBox, 0, 1, Qt::AlignRight );

#ifdef CHAOS_INITIATIVE
Expand Down

0 comments on commit 8f7e8af

Please sign in to comment.