Good Day
I store points in an array (points taken from position of mouse click)
In my paintEvent I draw points from array
painter.setPen(myPen);
foreach(tempMark, myPoints)
{
painter.drawEllipse(tempMark, 2, 2);
}
painter.setPen(myPen);
foreach(tempMark, myPoints)
{
painter.drawEllipse(tempMark, 2, 2);
}
To copy to clipboard, switch view to plain text mode
I created an UNDO Button that deletes the last point from array
I tested it, by writing points to file, That point is deleted
But my paintEvent still displays that point while I'm creating new points
(note all points must be displayed at all times during the run of the program)
If I click Undo, it should Remove only the last point
(which it does from the array - Button is working) But the point is still displayed on the screen
PushButton_Undo
myPoints.removeLast();
this->repaint(); //-> probably this->repaint() not working! maybe
myPoints.removeLast();
this->repaint(); //-> probably this->repaint() not working! maybe
To copy to clipboard, switch view to plain text mode
Do I add something to the paint Event?
Any Ideas?
Many Thanks
Bookmarks