too_many_classes.patch
src/gui/symbology-ng/qgscategorizedsymbolrendererv2widget.cpp | ||
---|---|---|
568 | 568 |
QList<QVariant> unique_vals; |
569 | 569 |
mLayer->uniqueValues( idx, unique_vals ); |
570 | 570 | |
571 |
// ask to abort if too many classes |
|
572 |
if ( unique_vals.size() >= 1000 ) |
|
573 |
{ |
|
574 |
int res = QMessageBox::warning( 0, tr( "High number of classes!" ), |
|
575 |
tr( "Classification would yield %1 entries which might not be expected. Continue?" ).arg( unique_vals.size() ), |
|
576 |
QMessageBox::Ok | QMessageBox::Cancel, |
|
577 |
QMessageBox::Cancel ); |
|
578 |
if ( res == QMessageBox::Cancel ) |
|
579 |
{ |
|
580 |
return; |
|
581 |
} |
|
582 |
} |
|
583 | ||
571 | 584 |
//DlgAddCategories dlg(mStyle, createDefaultSymbol(), unique_vals, this); |
572 | 585 |
//if (!dlg.exec()) |
573 | 586 |
// return; |