Skip to content

Conversation

@mgrojo
Copy link
Member

@mgrojo mgrojo commented Jun 19, 2018

When we know that the just executed query has not returned data, reset the
table results model, so the results view is also reset.

Added QAbstractItemModel::beginResetModel() and
QAbstractItemModel::endResetModel() to the model's reset method. This
resets completely the table view.

This improves the situation for #1431, without addressing the underlying
problem of not detecting correctly the type of query. In any case, any
query not returning data should reset the results from previous queries.

When we know that the just executed query has not returned data, reset the
table results model, so the results view is also reset.

Added QAbstractItemModel::beginResetModel() and
QAbstractItemModel::endResetModel() to the model's reset method. This
resets completely the table view.

This improves the situation for #1431, without addressing the underlying
problem of not detecting correctly the type of query. In any case, any
query not returning data should reset the results from previous queries.
@justinclift
Copy link
Member

Agreed, the concept sounds right. 😄

@MKleusberg
Copy link
Member

Yep, seems right. I think the only reason why we didn't clear the table view there was that it's more convenient to view the results of a query and then issue insert/delete/update/... commands based on that without getting your query results removed. But I guess it's causing more confusion than being useful. Also this is why we have added SQL tabs in the meantime.

So I'm just going to merge this. I hope nobody minds 😉 Thanks Manuel!

@MKleusberg MKleusberg merged commit 01f0146 into master Jun 21, 2018
@MKleusberg MKleusberg deleted the reset_results branch June 21, 2018 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants