diff --git a/GUI_main/UIMainWindow.cpp b/GUI_main/UIMainWindow.cpp index fb044bea569fcdf6f90214675073f4d0d83dcf33..ffeeb8c2b5e0e00598626e456e73ec6c3220ff7f 100644 --- a/GUI_main/UIMainWindow.cpp +++ b/GUI_main/UIMainWindow.cpp @@ -915,9 +915,17 @@ void UIMainWindow::removeFromCurrentProject() QList *itemsToRemove = (QList*) &tempList; - QString confirmMsg( "Remove the following items?" ); - for( auto i=itemsToRemove->begin(); i!=itemsToRemove->end(); ++i ) - confirmMsg += "\n - " + (*i)->text(0); + QString confirmMsg; + if( itemsToRemove->size() <= 10 ) + { + confirmMsg = "Remove the following items from the current project?\n"; + auto i = itemsToRemove->begin(); + confirmMsg += (*i)->text(0); + for( ++i; i!=itemsToRemove->end(); ++i ) + confirmMsg += ", " + (*i)->text(0); + } + else + confirmMsg = "Remove the " + QString::number(itemsToRemove->size()) + " selected items from the current project?"; QMessageBox::StandardButton answer = QMessageBox::warning( this,