Skip to content

Commit b6e8c8d

Browse files
mbernasocchipka
authored andcommitted
Single selection only. Segfaults resolved
1 parent 2ced86c commit b6e8c8d

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/plugins/globe/globe_plugin_dialog.cpp

+1-7
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,7 @@
210210

211211
void QgsGlobePluginDialog::on_elevationRemove_clicked()
212212
{
213-
QList< QTableWidgetItem* > si = elevationDatasourcesWidget->selectedItems();
214-
for(int i = 0; i < si.count(); i++)
215-
{
216-
elevationDatasourcesWidget->removeRow( elevationDatasourcesWidget->row(si.at(i)) );
217-
}
213+
elevationDatasourcesWidget->removeRow( elevationDatasourcesWidget->currentRow() );
218214
}
219215

220216
void QgsGlobePluginDialog::readElevationDatasourcesFromSettings()
@@ -226,8 +222,6 @@
226222
settings.setArrayIndex(i);
227223
QTableWidgetItem *type = new QTableWidgetItem(settings.value("type").toString());
228224
QTableWidgetItem *uri = new QTableWidgetItem(settings.value("uri").toString());
229-
// uri->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled);
230-
// type->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled);
231225
elevationDatasourcesWidget->setRowCount(1+i);
232226
elevationDatasourcesWidget->setItem(i, 0, type);
233227
elevationDatasourcesWidget->setItem(i, 1, uri);

0 commit comments

Comments
 (0)