mirror of
https://github.com/LMMS/lmms.git
synced 2026-03-23 08:23:17 -04:00
Add "Save as new version" action to project menu
Use Shortcut Ctrl+Alt+S. Part of issue #86
This commit is contained in:
@@ -102,6 +102,7 @@ public slots:
|
||||
void openProject( void );
|
||||
bool saveProject( void );
|
||||
bool saveProjectAs( void );
|
||||
bool saveProjectAsNewVersion( void );
|
||||
void showSettingsDialog( void );
|
||||
void aboutLMMS( void );
|
||||
void help( void );
|
||||
|
||||
@@ -243,6 +243,10 @@ void MainWindow::finalize( void )
|
||||
this, SLOT( saveProject() ),
|
||||
Qt::CTRL + Qt::Key_S );
|
||||
|
||||
project_menu->addAction( embed::getIconPixmap( "project_save" ),
|
||||
tr( "Save as new &version" ),
|
||||
this, SLOT( saveProjectAsNewVersion() ),
|
||||
Qt::CTRL + Qt::ALT + Qt::Key_S );
|
||||
project_menu->addAction( embed::getIconPixmap( "project_saveas" ),
|
||||
tr( "Save &As..." ),
|
||||
this, SLOT( saveProjectAs() ),
|
||||
@@ -776,6 +780,24 @@ bool MainWindow::saveProjectAs( void )
|
||||
|
||||
|
||||
|
||||
bool MainWindow::saveProjectAsNewVersion( void )
|
||||
{
|
||||
QString fileName = engine::getSong()->projectFileName();
|
||||
if( fileName == "" )
|
||||
{
|
||||
return saveProjectAs();
|
||||
}
|
||||
else
|
||||
{
|
||||
VersionedSaveDialog::changeFileNameVersion( fileName, true );
|
||||
engine::getSong()->guiSaveProjectAs( fileName );
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void MainWindow::showSettingsDialog( void )
|
||||
{
|
||||
setupDialog sd;
|
||||
|
||||
Reference in New Issue
Block a user