Fix inserting new SVG <g> element

New <g> container element should be created every time
the actual transformation is changed and that's why
the flag should be set in ComputeScaleAndOrigin().
This commit is contained in:
Artur Wieczorek 2021-07-26 20:30:57 +02:00
parent 4193077888
commit b1206a6d50
2 changed files with 6 additions and 17 deletions

View File

@ -127,23 +127,7 @@ public:
return wxCOPY;
}
virtual void SetLogicalOrigin(wxCoord x, wxCoord y) wxOVERRIDE
{
wxDCImpl::SetLogicalOrigin(x, y);
m_graphics_changed = true;
}
virtual void SetDeviceOrigin(wxCoord x, wxCoord y) wxOVERRIDE
{
wxDCImpl::SetDeviceOrigin(x, y);
m_graphics_changed = true;
}
virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp) wxOVERRIDE
{
wxDCImpl::SetAxisOrientation(xLeftRight, yBottomUp);
m_graphics_changed = true;
}
virtual void ComputeScaleAndOrigin() wxOVERRIDE;
virtual void SetBackground(const wxBrush& brush) wxOVERRIDE;
virtual void SetBackgroundMode(int mode) wxOVERRIDE;

View File

@ -1263,6 +1263,11 @@ wxCoord wxSVGFileDCImpl::GetCharWidth() const
return sDC.GetCharWidth();
}
void wxSVGFileDCImpl::ComputeScaleAndOrigin()
{
wxDCImpl::ComputeScaleAndOrigin();
m_graphics_changed = true;
}
// ----------------------------------------------------------
// wxSVGFileDCImpl - set functions