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

Re: gEDA-dev: View Extents on page load behaviour



Hi Peter,
try the attached patch. I think it mostly solves the problem.

One thing I notice is that pages other than the current one are not
fully zoomed extents.
This seems to be because the layout of the gschem window (including the
menu bar, the toolbar,...) is changed before.
Maybe the files are loaded and the menu bar or the toolbar are displayed
later, I don't know.

Regards,

Carlos

El jue, 05-10-2006 a las 20:57 +0100, Peter Clifton escribió:
> Hi,
> 
> I've just spotted another mis-behaviour with view-extends. I updated to
> CVS HEAD to be sure it wasn't fixed in the recent patches, but no change
> in behaviour.
> 
> If I open two schematics from the command line..
> 
> gschem page1.sch page2.sch
> 
> I find page2.sch viewed with zoom extents, but when I switch back to
> page1, it is not zoomed in.
> 
> Peter C.
> 
> 
> 
> 
> _______________________________________________
> geda-dev mailing list
> geda-dev@moria.seul.org
> http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev
Index: src/gschem.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/gschem.c,v
retrieving revision 1.37
diff -u -r1.37 gschem.c
--- src/gschem.c	30 Sep 2006 11:30:26 -0000	1.37
+++ src/gschem.c	6 Oct 2006 16:32:01 -0000
@@ -278,6 +278,22 @@
                        w_current->page_current->page_filename);
       }
     }
+
+    /* Run the new page hook */
+    if (scm_hook_empty_p(new_page_hook) == SCM_BOOL_F &&
+	w_current->page_current != NULL) {
+      scm_run_hook(new_page_hook,
+		   scm_cons(g_make_page_smob(w_current, 
+					     w_current->page_current),
+			    SCM_EOL));
+    }
+    
+    /* Do a zoom extents for each page */
+    a_zoom_extents(w_current,
+		   w_current->page_current->object_head,
+		   A_PAN_DONT_REDRAW);
+
+    /* Go to the next argument */
     i++;
   }
 
@@ -311,18 +327,6 @@
                    w_current->page_current->page_filename);
   }
 
-  /* Run the new page hook */
-  if (scm_hook_empty_p(new_page_hook) == SCM_BOOL_F &&
-      w_current->page_current != NULL) {
-    scm_run_hook(new_page_hook,
-		 scm_cons(g_make_page_smob(w_current, 
-					   w_current->page_current),
-			  SCM_EOL));
-  }
-
-  a_zoom_extents(w_current,
-		 w_current->page_current->object_head,
-		 A_PAN_DONT_REDRAW);
   o_undo_savestate(w_current, UNDO_ALL);
   
   


_______________________________________________
geda-dev mailing list
geda-dev@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev