mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 11:00:44 -06:00
plot: Add button to load all data
See issue #499.
This also fixes a bug introduced in 6784a6a854
which effectively disabled the partial prefetch mechanism on large
tables.
This commit is contained in:
@@ -1713,10 +1713,6 @@ void MainWindow::updatePlot(SqliteTableModel *model, bool update)
|
||||
|
||||
if(model)
|
||||
{
|
||||
// Make sure all data is loaded before trying to plot anything
|
||||
while(model->canFetchMore())
|
||||
model->fetchMore();
|
||||
|
||||
for(int i = 0; i < model->columnCount(); ++i)
|
||||
{
|
||||
QVariant::Type columntype = guessdatatype(model, i);
|
||||
@@ -2493,3 +2489,16 @@ void MainWindow::browseDataSetDefaultTableEncoding()
|
||||
{
|
||||
browseDataSetTableEncoding(true);
|
||||
}
|
||||
|
||||
void MainWindow::browseDataFetchAllData()
|
||||
{
|
||||
if(m_browseTableModel)
|
||||
{
|
||||
// Make sure all data is loaded
|
||||
while(m_browseTableModel->canFetchMore())
|
||||
m_browseTableModel->fetchMore();
|
||||
|
||||
// Update plot
|
||||
updatePlot(m_browseTableModel);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user