mirror of
https://github.com/mapmapteam/mapmap.git
synced 2026-06-16 12:33:19 +02:00
fill when mouse leaves
This commit is contained in:
@@ -260,7 +260,6 @@ void MyCanvas::OnMouseEvent(wxMouseEvent& event)
|
||||
{
|
||||
manager.addPolyLine(point);
|
||||
should_render = true;
|
||||
manager.setStyle(POLYGON);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -268,6 +267,17 @@ void MyCanvas::OnMouseEvent(wxMouseEvent& event)
|
||||
manager.addPoint(point);
|
||||
should_render = true;
|
||||
}
|
||||
if (event.Leaving())
|
||||
{
|
||||
manager.setStyle(POLYGON);
|
||||
should_render = true;
|
||||
}
|
||||
else if (event.Entering())
|
||||
{
|
||||
manager.setStyle(LINES);
|
||||
should_render = true;
|
||||
}
|
||||
|
||||
if (should_render)
|
||||
Render();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user