diff --git a/sources/dataBase/ui/elementquerywidget.cpp b/sources/dataBase/ui/elementquerywidget.cpp index b68036028..fff775b82 100644 --- a/sources/dataBase/ui/elementquerywidget.cpp +++ b/sources/dataBase/ui/elementquerywidget.cpp @@ -378,10 +378,10 @@ QString ElementQueryWidget::queryStr() const where.clear(); } - QString exclude_condition = "(exclude_from_bom IS NULL OR exclude_from_bom != '1')"; - - filter_ += " AND " + exclude_condition; - // ------------------------------------------------------------- + // exclude_from_bom is already filtered by element_nomenclature_view + // (see createElementNomenclatureView() in projectdatabase.cpp); this + // widget's query reads FROM that view, so a flagged element never + // reaches this point in the first place. if (where.isEmpty() && !filter_.isEmpty()) { filter_.remove(0, 4); //Remove the first " AND" of filter.