moved creation of image to only when parent is a GridItem
This commit is contained in:
parent
bee1332737
commit
60ae2a7ca1
@ -867,10 +867,10 @@ namespace Volian.Controls.Library
|
|||||||
// - draw the saved grid image
|
// - draw the saved grid image
|
||||||
// - do the the load/reload of the grid
|
// - do the the load/reload of the grid
|
||||||
// - set Visible back to true.
|
// - set Visible back to true.
|
||||||
System.Drawing.Image img = this.CreateImage();
|
|
||||||
Visible = false;
|
Visible = false;
|
||||||
if (Parent is GridItem)
|
if (Parent is GridItem)
|
||||||
{
|
{
|
||||||
|
System.Drawing.Image img = this.CreateImage();
|
||||||
using (Graphics gr = (Parent as GridItem).CreateGraphics())
|
using (Graphics gr = (Parent as GridItem).CreateGraphics())
|
||||||
{
|
{
|
||||||
gr.DrawImage(img, Left, Top);
|
gr.DrawImage(img, Left, Top);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user