Re-analyse only if the window width has been changed

This commit is contained in:
Alexander Kojevnikov 2010-07-07 18:45:12 +10:00
parent df52ab83b6
commit a0ed5d62fd

View File

@ -94,10 +94,14 @@ namespace Spek {
queue_draw (); queue_draw ();
} }
private int prev_width = -1;
private override void size_allocate (Gdk.Rectangle allocation) { private override void size_allocate (Gdk.Rectangle allocation) {
base.size_allocate (allocation); base.size_allocate (allocation);
if (file_name != null) { bool width_changed = prev_width != allocation.width;
prev_width = allocation.width;
if (file_name != null && width_changed) {
start (); start ();
} }
} }