Skip to content

Commit

Permalink
Samplers, crate, playlists: fix storing import/export paths
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed Apr 10, 2022
1 parent 9564ac2 commit 5d1e248
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/library/baseplaylistfeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ void BasePlaylistFeature::slotImportPlaylist() {

// Update the import/export playlist directory
QString fileDirectory(playlistFile);
fileDirectory.truncate(playlistFile.lastIndexOf(QDir::separator()));
fileDirectory.truncate(playlistFile.lastIndexOf("/"));
m_pConfig->set(kConfigKeyLastImportExportPlaylistDirectory,
ConfigValue(fileDirectory));

Expand Down Expand Up @@ -412,7 +412,7 @@ void BasePlaylistFeature::slotCreateImportPlaylist() {

// Set last import directory
QString fileDirectory(playlistFiles.first());
fileDirectory.truncate(playlistFiles.first().lastIndexOf(QDir::separator()));
fileDirectory.truncate(playlistFiles.first().lastIndexOf("/"));
m_pConfig->set(kConfigKeyLastImportExportPlaylistDirectory,
ConfigValue(fileDirectory));

Expand Down Expand Up @@ -483,7 +483,7 @@ void BasePlaylistFeature::slotExportPlaylist() {

// Update the import/export playlist directory
QString fileDirectory(fileLocation);
fileDirectory.truncate(fileLocation.lastIndexOf(QDir::separator()));
fileDirectory.truncate(fileLocation.lastIndexOf("/"));
m_pConfig->set(kConfigKeyLastImportExportPlaylistDirectory,
ConfigValue(fileDirectory));

Expand Down
6 changes: 3 additions & 3 deletions src/library/crate/cratefeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ void CrateFeature::slotImportPlaylist() {

// Update the import/export crate directory
QString fileDirectory(playlistFile);
fileDirectory.truncate(playlistFile.lastIndexOf(QDir::separator()));
fileDirectory.truncate(playlistFile.lastIndexOf("/"));
m_pConfig->set(kConfigKeyLastImportExportCrateDirectoryKey,
ConfigValue(fileDirectory));

Expand Down Expand Up @@ -614,7 +614,7 @@ void CrateFeature::slotCreateImportCrate() {

// Set last import directory
QString fileDirectory(playlistFiles.first());
fileDirectory.truncate(playlistFiles.first().lastIndexOf(QDir::separator()));
fileDirectory.truncate(playlistFiles.first().lastIndexOf("/"));
m_pConfig->set(kConfigKeyLastImportExportCrateDirectoryKey,
ConfigValue(fileDirectory));

Expand Down Expand Up @@ -706,7 +706,7 @@ void CrateFeature::slotExportPlaylist() {
}
// Update the import/export crate directory
QString fileDirectory(fileLocation);
fileDirectory.truncate(fileLocation.lastIndexOf(QDir::separator()));
fileDirectory.truncate(fileLocation.lastIndexOf("/"));
m_pConfig->set(kConfigKeyLastImportExportCrateDirectoryKey,
ConfigValue(fileDirectory));

Expand Down
4 changes: 2 additions & 2 deletions src/mixer/samplerbank.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void SamplerBank::slotSaveSamplerBank(double v) {

// Update the import/export directory
QString fileDirectory(samplerBankPath);
fileDirectory.truncate(samplerBankPath.lastIndexOf(QDir::separator()));
fileDirectory.truncate(samplerBankPath.lastIndexOf("/"));
m_pConfig->set(kConfigkeyLastImportExportDirectory,
ConfigValue(fileDirectory));

Expand Down Expand Up @@ -154,7 +154,7 @@ void SamplerBank::slotLoadSamplerBank(double v) {

// Update the import/export directory
QString fileDirectory(samplerBankPath);
fileDirectory.truncate(samplerBankPath.lastIndexOf(QDir::separator()));
fileDirectory.truncate(samplerBankPath.lastIndexOf("/"));
m_pConfig->set(kConfigkeyLastImportExportDirectory,
ConfigValue(fileDirectory));

Expand Down

0 comments on commit 5d1e248

Please sign in to comment.