diff --git a/LocalizationService.cpp b/LocalizationService.cpp index da70a00..7d96957 100644 --- a/LocalizationService.cpp +++ b/LocalizationService.cpp @@ -6,6 +6,8 @@ #include #include #include +#include +#include #include #include #include @@ -30,7 +32,7 @@ struct Surf Point3d centroid; }; -static Point3d centroidFromPoints(const vtkPoints* pts) +static Point3d centroidFromPoints(vtkPoints* pts) { Point3d c; if (!pts) return c; @@ -41,6 +43,7 @@ static Point3d centroidFromPoints(const vtkPoints* pts) double p[3]; for (vtkIdType i = 0; i < n; ++i) { + // vtkPoints::GetPoint is non-const in VTK 9.x, so keep pts non-const here. pts->GetPoint(i, p); sx += p[0]; sy += p[1]; diff --git a/gRen.h b/gRen.h index 0dd7e77..173686d 100644 --- a/gRen.h +++ b/gRen.h @@ -34,6 +34,16 @@ #include +// Types used as members / inlined code below +#include +#include +#include +#include +#include +#include +#include +#include + #include #include diff --git a/mainw.cpp b/mainw.cpp index 0dd45c2..bff9f18 100644 --- a/mainw.cpp +++ b/mainw.cpp @@ -1091,6 +1091,7 @@ void MainWindow::onLocalizationError(const QString& message) { qWarning() << "Localization error:" << message; // Re-enable UI bits if needed - Ui->pb_localize->setEnabled(true); - Ui->pb_localize_abort->setEnabled(false); + // UI uses generic button names from the legacy .ui + Ui->pushButton_3->setEnabled(true); // "Localize" / start + Ui->pushButton_4->setEnabled(false); // abort }