Save as view: allow any state in the table

This check was supposed to help the user understand what this operation was for,
but it was actually preventing to save as view table states that had global
filter, display formats or custom order and not column filters. It's better to
give the user the freedom, even to create maybe useless vies as:

`CREATE VIEW "example_view" AS SELECT * FROM "main"."example"`

See issue #2615
This commit is contained in:
mgrojo
2021-03-12 20:28:42 +01:00
parent 5d80f9877d
commit 2826e7b989

View File

@@ -1411,11 +1411,8 @@ void TableBrowser::exportFilteredTable()
void TableBrowser::saveFilterAsView()
{
if (m_model->filterCount() > 0)
// Save as view a custom query without rowid
emit createView(m_model->customQuery(false));
else
QMessageBox::information(this, qApp->applicationName(), tr("There is no filter set for this table. View will not be created."));
// Save as view a custom query without rowid
emit createView(m_model->customQuery(false));
}
void TableBrowser::setTableEncoding(bool forAllTables)