[longomatch] Fix drawing widget resizing



commit 25699044bb8a136c84aad005bf123f27fc6e82ad
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Thu Jan 14 01:13:52 2010 +0100

    Fix drawing widget resizing

 LongoMatch/Gui/Component/DrawingWidget.cs |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/LongoMatch/Gui/Component/DrawingWidget.cs b/LongoMatch/Gui/Component/DrawingWidget.cs
index 23bbdcf..42cdeda 100644
--- a/LongoMatch/Gui/Component/DrawingWidget.cs
+++ b/LongoMatch/Gui/Component/DrawingWidget.cs
@@ -93,10 +93,11 @@ namespace LongoMatch.Gui.Component
 				}
 				drawingarea.WidthRequest=sourceWidth;
 				drawingarea.HeightRequest=sourceHeight;
-				if (GdkWindow != null)
-					GdkWindow.Resize(sourceWidth,sourceHeight);
+				if (drawingarea.GdkWindow != null)
+				    drawingarea.GdkWindow.Resize(sourceWidth,sourceHeight);				
 				value.Dispose();
 				loaded = true;
+				QueueDraw();
 			}
 		}
 
@@ -373,7 +374,7 @@ namespace LongoMatch.Gui.Component
 			// We can't set the cursor until the Gdk.Window exists
 			DrawTool = selectedTool;
 			if (loaded)
-				GdkWindow.Resize(sourceWidth,sourceHeight);
+				drawingarea.GdkWindow.Resize(sourceWidth,sourceHeight);
 		}
 	}
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]