Commit a9354ca3 authored by Frédéric Larue's avatar Frédéric Larue

From project item removal dialog improved.

parent 319bdb49
......@@ -915,9 +915,17 @@ void UIMainWindow::removeFromCurrentProject()
QList<UIDataWidgetItem*> *itemsToRemove = (QList<UIDataWidgetItem*>*) &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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment