aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-02-18 09:43:34 -0500
committerKen Moore <ken@pcbsd.org>2015-02-18 09:43:34 -0500
commit730c5c5e1c3ee1912af717bc21eec9dd65413e91 (patch)
treeab803ffe5fe4e9e94db21d8e08eeca577f3ddc9c
parentUse the XCB CloseWindow routine instead of the old XLib routine during the se... (diff)
downloadlumina-730c5c5e1c3ee1912af717bc21eec9dd65413e91.tar.gz
lumina-730c5c5e1c3ee1912af717bc21eec9dd65413e91.tar.bz2
lumina-730c5c5e1c3ee1912af717bc21eec9dd65413e91.zip
Ok, *now* the file manager makes sure the slideshow viewer does not change the current item when re-loading the files in the directory (caused issues when remvoing files from within the slideshow viewer).
-rw-r--r--lumina-fm/MainUI.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/lumina-fm/MainUI.cpp b/lumina-fm/MainUI.cpp
index f4f85f80..7a10d41e 100644
--- a/lumina-fm/MainUI.cpp
+++ b/lumina-fm/MainUI.cpp
@@ -474,8 +474,12 @@ void MainUI::AvailableBackups(QString basedir, QStringList snapdirs){
void MainUI::AvailablePictures(QStringList pics){
if(!pics.isEmpty()){
+ QString citem = ui->combo_image_name->currentText();
ui->combo_image_name->clear();
ui->combo_image_name->addItems(pics);
+ if(pics.contains(citem)){
+ ui->combo_image_name->setCurrentText(citem);
+ }
ui->tool_goToImages->setVisible(true);
}
@@ -917,14 +921,14 @@ void MainUI::removePicture(){
file.append(ui->combo_image_name->currentText());
if( QFile::remove(file) ){
int index = ui->combo_image_name->currentIndex();
+ int newindex = index;
+ newindex--;
ui->combo_image_name->removeItem( index );
- if(ui->combo_image_name->count() > index){} //re-use the same index (go to the next picture)
- else if(ui->combo_image_name->count() > 0 ){ index = ui->combo_image_name->count()-1; } // go to the previous picture (last one in the list)
- else{ index = -1; }
- if(index>=0){
- ui->combo_image_name->setCurrentIndex(index);
- }
- showNewPicture();
+ //showNewPicture();
+ //Move to the new index before removing the old one
+ /*if(newindex>=0){
+ ui->combo_image_name->setCurrentIndex(newindex);
+ }*/
}
}
bgstack15