Skip to content

Commit

Permalink
Fix initial selection of Classification attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
uclaros committed Jan 23, 2025
1 parent fd67cd1 commit f33604b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/app/3d/qgs3dmapcanvaswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ Qgs3DMapCanvasWidget::Qgs3DMapCanvasWidget( const QString &name, bool isDocked )
mMapToolMeasureLine = new Qgs3DMapToolMeasureLine( mCanvas );

mMapToolPointCloudChangeAttribute = new Qgs3DMapToolPointCloudChangeAttribute( mCanvas );
onPointCloudChangeAttributeSettingsChanged();

mLabelPendingJobs = new QLabel( this );
mProgressPendingJobs = new QProgressBar( this );
Expand Down Expand Up @@ -446,8 +445,11 @@ void Qgs3DMapCanvasWidget::updateLayerRelatedActions( QgsMapLayer *layer )

whileBlocking( mCboChangeAttribute )->addItem( attribute.name() );
}
if ( mCboChangeAttribute->findText( previousAttribute ) != -1 )
mCboChangeAttribute->setCurrentText( previousAttribute );

int index = mCboChangeAttribute->findText( previousAttribute );
if ( index < 0 )
index = mCboChangeAttribute->findText( QStringLiteral( "Classification" ) );
mCboChangeAttribute->setCurrentIndex( std::max( index, 0 ) );

enableEditingTools( pcLayer->isEditable() );
}
Expand Down Expand Up @@ -923,7 +925,6 @@ void Qgs3DMapCanvasWidget::onPointCloudChangeAttributeSettingsChanged()
}

mMapToolPointCloudChangeAttribute->setAttribute( attributeName );
// TODO: validate values for attribute
mMapToolPointCloudChangeAttribute->setNewValue( mSpinChangeAttributeValue->value() );
}

Expand Down

0 comments on commit f33604b

Please sign in to comment.