Skip to content
Permalink
Browse files

Use cache from settings

  • Loading branch information
pka committed Dec 9, 2010
1 parent 0cbd8a3 commit 4ed9c53060f0b8d4d2a926bae875a3c3fea1affc
Showing with 4 additions and 4 deletions.
  1. +2 −2 src/plugins/globe/globe_plugin.cpp
  2. +2 −2 src/plugins/globe/globe_plugin_dialog.cpp
@@ -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);
}

0 comments on commit 4ed9c53

Please sign in to comment.
You can’t perform that action at this time.