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:
@@ -127,23 +127,7 @@ public:
|
|||||||
return wxCOPY;
|
return wxCOPY;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void SetLogicalOrigin(wxCoord x, wxCoord y) wxOVERRIDE
|
virtual void ComputeScaleAndOrigin() 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 SetBackground(const wxBrush& brush) wxOVERRIDE;
|
virtual void SetBackground(const wxBrush& brush) wxOVERRIDE;
|
||||||
virtual void SetBackgroundMode(int mode) wxOVERRIDE;
|
virtual void SetBackgroundMode(int mode) wxOVERRIDE;
|
||||||
|
@@ -1263,6 +1263,11 @@ wxCoord wxSVGFileDCImpl::GetCharWidth() const
|
|||||||
return sDC.GetCharWidth();
|
return sDC.GetCharWidth();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxSVGFileDCImpl::ComputeScaleAndOrigin()
|
||||||
|
{
|
||||||
|
wxDCImpl::ComputeScaleAndOrigin();
|
||||||
|
m_graphics_changed = true;
|
||||||
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------
|
// ----------------------------------------------------------
|
||||||
// wxSVGFileDCImpl - set functions
|
// wxSVGFileDCImpl - set functions
|
||||||
|
Reference in New Issue
Block a user