From a9354ca3e8d0eab63fcf4e9db19137c73cf0ed50 Mon Sep 17 00:00:00 2001 From: Frederic Larue Date: Tue, 8 Oct 2019 14:17:49 +0200 Subject: [PATCH] From project item removal dialog improved. --- GUI_main/UIMainWindow.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/GUI_main/UIMainWindow.cpp b/GUI_main/UIMainWindow.cpp index fb044be..ffeeb8c 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, -- GitLab