mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Use cache from settings
This commit is contained in:
parent
0cbd8a3e69
commit
4ed9c53060
@ -619,6 +619,7 @@ void GlobePlugin::layersChanged()
|
||||
for(int i = 0; i < table->rowCount(); ++i)
|
||||
{
|
||||
QString type = table->item(i, 0)->text();
|
||||
bool cache = table->item(i, 1)->checkState();
|
||||
QString uri = table->item(i, 2)->text();
|
||||
MapLayer* layer = 0;
|
||||
|
||||
@ -647,8 +648,7 @@ void GlobePlugin::layersChanged()
|
||||
}
|
||||
map->addMapLayer( layer );
|
||||
|
||||
bool cache = table->item(i, 1)->checkState();
|
||||
layer->setCache( 0 ); //TODO: from dialog
|
||||
if ( !cache || type == "Worldwind" ) layer->setCache( 0 ); //no tms cache for worldwind (use worldwind_cache)
|
||||
}
|
||||
|
||||
//remove QGIS layer
|
||||
|
@ -202,7 +202,7 @@ void QgsGlobePluginDialog::on_elevationAdd_clicked()
|
||||
QTableWidgetItem *type = new QTableWidgetItem(elevationCombo->currentText());
|
||||
QTableWidgetItem *uri = new QTableWidgetItem(elevationPath->text());
|
||||
QTableWidgetItem* cache = new QTableWidgetItem();
|
||||
cache->setCheckState(Qt::Unchecked);
|
||||
cache->setCheckState( (elevationCombo->currentText() == "Worldwind") ? Qt::Checked : Qt::Unchecked ); //worldwind_cache will be active
|
||||
elevationDatasourcesWidget->setRowCount(1+i);
|
||||
elevationDatasourcesWidget->setItem(i, 0, type);
|
||||
elevationDatasourcesWidget->setItem(i, 1, cache);
|
||||
@ -285,7 +285,7 @@ void QgsGlobePluginDialog::readElevationDatasources()
|
||||
elevationDatasourcesWidget->setRowCount(1+i);
|
||||
elevationDatasourcesWidget->setItem(i, 0, type);
|
||||
QTableWidgetItem* chkBoxItem = new QTableWidgetItem();
|
||||
(cache) ? chkBoxItem->setCheckState(Qt::Checked) : chkBoxItem->setCheckState(Qt::Unchecked);
|
||||
chkBoxItem->setCheckState( cache ? Qt::Checked : Qt::Unchecked );
|
||||
elevationDatasourcesWidget->setItem(i, 1, chkBoxItem);
|
||||
elevationDatasourcesWidget->setItem(i, 2, uri);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user