A little background i am drawing polyline Points using geometry editor now what i am doing is when i click on the map it is drawing the connected points on map and i am saving the coordinates to a vector along with some other settings it works fine but when i click on the existing point it still add the Lat-longs of the clicked area but no other point is drawn on map what i want to do is instead of changing logic on my side because it will be complex i just want the functionality of clicking previous points disabled like you can only draw from current point i don't wanna allow user to click previous point while in drawing state is there any possibility but keep the undo functionality enabled??
Another workaround to this if there's any better way to do it like i just want the waypoints saved in my vector along with its number below is the code of what i am currently trying to do.
Another small question how to change color of polylines being drawn
if(!m_geometryEditor->isStarted())
{
m_geometryEditor->start(GeometryType::Polyline);
connect(mapConfigs::getInstance(),&mapConfigs::signalDepthChanged,this,&class::editHeightandVelocity);
if(m_geometryEditor->isStarted())
{
connect(m_mapView, &MapGraphicsView::mouseClicked, this, &class::onMouseClicked);
}
void class::onMouseClicked(const QMouseEvent& event)
{
Point mapPoint = m_mapView->screenToLocation(event.position().x(),event.position().y());
Point mapPointConverted = convertMercator_Coordinates(mapPoint);
addMapDataToVector(mapPointConverted);
qDebug() << "Converted MapPoint: Latitude:" << mapPointConverted.y() << "Longitude:" << mapPointConverted.x();
}