-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
/** Add data to the internal vector. This method DOES NOT refresh the mpWindow unless updatePlot = true;
* Do it manually by calling UpdateAll() or just Fit() if we want to adjust plot
* BEWARE : You can not call this function if mpFXYVector layer is not added to the mpWindow layers list.
*/
bool mpFXYVector::AddData(const double x, const double y, bool updatePlot)
{
bool new_limit = false;
const mpFloatRect* bbox = m_win->GetBoundingBox();
It will crash here, because the m_win is 0x0.
So that this code crashed:
mpFXYVector* arrowLine = new mpFXYVector("Arrow");
arrowLine->SetPen(wxPen(*wxBLACK, 2));
arrowLine->AddData(plotStartX, plotStartY, false);
arrowLine->AddData(plotEndX, plotEndY, false);
plotWindow->AddLayer(arrowLine, true);
plotWindow->Refresh();
Maybe, we have to add some error report or error check here inside the AddData()? function call.
Any ideas?
Thanks.
Metadata
Metadata
Assignees
Labels
No labels