Skip to content

Commit

Permalink
Update file that was not automatically merged from master
Browse files Browse the repository at this point in the history
  • Loading branch information
artur-twardowski committed Dec 22, 2019
1 parent a16158a commit be7817d
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions src/gui/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,16 @@ MainWindow::MainWindow() :
m_workspace = new QMdiArea( splitter );

// Load background
emit initProgress(tr("Loading background artwork"));
QString bgArtwork = ConfigManager::inst()->backgroundArtwork();
QImage bgImage;
if( !bgArtwork.isEmpty() )
emit initProgress(tr("Loading background picture"));
QString backgroundPicFile = ConfigManager::inst()->backgroundPicFile();
QImage backgroundPic;
if( !backgroundPicFile.isEmpty() )
{
bgImage = QImage( bgArtwork );
backgroundPic = QImage( backgroundPicFile );
}
if( !bgImage.isNull() )
if( !backgroundPicFile.isNull() )
{
m_workspace->setBackground( bgImage );
m_workspace->setBackground( backgroundPic );
}
else
{
Expand Down Expand Up @@ -291,7 +291,7 @@ void MainWindow::finalize()
tr( "&Save" ),
this, SLOT( saveProject() ),
QKeySequence::Save );
project_menu->addAction( embed::getIconPixmap( "project_saveas" ),
project_menu->addAction( embed::getIconPixmap( "project_save" ),
tr( "Save &As..." ),
this, SLOT( saveProjectAs() ),
Qt::CTRL + Qt::SHIFT + Qt::Key_S );
Expand All @@ -300,8 +300,9 @@ void MainWindow::finalize()
this, SLOT( saveProjectAsNewVersion() ),
Qt::CTRL + Qt::ALT + Qt::Key_S );

project_menu->addAction( tr( "Save as default template" ),
this, SLOT( saveProjectAsDefaultTemplate() ) );
project_menu->addAction( embed::getIconPixmap( "project_save" ),
tr( "Save as default template" ),
this, SLOT( saveProjectAsDefaultTemplate() ) );

project_menu->addSeparator();
project_menu->addAction( embed::getIconPixmap( "project_import" ),
Expand Down Expand Up @@ -1517,7 +1518,12 @@ void MainWindow::exportProject(bool multiExport)
// Get first extension from selected dropdown.
// i.e. ".wav" from "WAV-File (*.wav), Dummy-File (*.dum)"
suffix = efd.selectedNameFilter().mid( stx + 2, etx - stx - 2 ).split( " " )[0].trimmed();
exportFileName.remove( "." + suffix, Qt::CaseInsensitive );

Qt::CaseSensitivity cs = Qt::CaseSensitive;
#if defined(LMMS_BUILD_APPLE) || defined(LMMS_BUILD_WIN32)
cs = Qt::CaseInsensitive;
#endif
exportFileName.remove( "." + suffix, cs );
if ( efd.selectedFiles()[0].endsWith( suffix ) )
{
if( VersionedSaveDialog::fileExistsQuery( exportFileName + suffix,
Expand Down

0 comments on commit be7817d

Please sign in to comment.