Skip to content

Commit

Permalink
Collect checked entry as the first step, fixes #1700
Browse files Browse the repository at this point in the history
  • Loading branch information
Emdek committed Jan 21, 2022
1 parent df36372 commit a3d65b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/ui/ContentFiltersViewWidget.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************
* Otter Browser: Web browser controlled by the user, not vice-versa.
* Copyright (C) 2013 - 2020 Michal Dutkiewicz aka Emdek <[email protected]>
* Copyright (C) 2013 - 2022 Michal Dutkiewicz aka Emdek <[email protected]>
* Copyright (C) 2014 - 2017 Jan Bajer aka bajasoft <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -852,6 +852,11 @@ void ContentFiltersViewWidget::save()
{
const QModelIndex entryIndex(getIndex(j, 0, categoryIndex));

if (entryIndex.data(Qt::CheckStateRole).toInt() == Qt::Checked)
{
profiles.append(entryIndex.data(NameRole).toString());
}

if (!entryIndex.data(IsModifiedRole).toBool())
{
continue;
Expand Down Expand Up @@ -907,11 +912,6 @@ void ContentFiltersViewWidget::save()
}

m_model->setData(entryIndex, false, IsModifiedRole);

if (entryIndex.data(Qt::CheckStateRole).toBool())
{
profiles.append(profileSummary.name);
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/ui/ContentFiltersViewWidget.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************
* Otter Browser: Web browser controlled by the user, not vice-versa.
* Copyright (C) 2013 - 2020 Michal Dutkiewicz aka Emdek <[email protected]>
* Copyright (C) 2013 - 2022 Michal Dutkiewicz aka Emdek <[email protected]>
* Copyright (C) 2014 - 2017 Jan Bajer aka bajasoft <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
Expand Down

0 comments on commit a3d65b6

Please sign in to comment.