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

gEDA-cvs: CVS update: i_callbacks.c



  User: cnieves 
  Date: 06/10/22 06:08:45

  Modified:    .        Tag: glist_dev i_callbacks.c
  Log:
  * src/i_callbacks.c: objects can be mirrored while moving or copying,
  
  so make the edit_mirror_hotkey callback aware of this.
  
  Moved w_current->DONT_REDRAW = 0 inside the 'if' in the 
  
  edit_rotate_90_hotkey callback
  
  
  
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.69.2.3  +39 -10    eda/geda/gaf/gschem/src/i_callbacks.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: i_callbacks.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/i_callbacks.c,v
  retrieving revision 1.69.2.2
  retrieving revision 1.69.2.3
  diff -u -b -r1.69.2.2 -r1.69.2.3
  --- i_callbacks.c	22 Oct 2006 09:59:17 -0000	1.69.2.2
  +++ i_callbacks.c	22 Oct 2006 10:08:45 -0000	1.69.2.3
  @@ -900,10 +900,11 @@
     if (object_list) {
       i_update_middle_button(w_current,
                              i_callback_edit_rotate_90_hotkey, _("Rotate"));
  +    if (w_current->inside_action == 0) {
       /* Allow o_rotate_90 to redraw the objects */
       w_current->DONT_REDRAW = 0;
  -    if (w_current->inside_action == 0) 
         o_rotate_90(w_current, object_list, mouse_x, mouse_y);
  +    }
       else {
         o_drawbounding(w_current, NULL, object_list,
   		     x_get_darkcolor(w_current->bb_color), TRUE);
  @@ -953,24 +954,52 @@
   {
     TOPLEVEL *w_current = (TOPLEVEL *) data;
     GList *object_list;
  +  int redraw_state; 
   
     exit_if_null(w_current);
   
  +  if (w_current->inside_action == 0)
     o_redraw_cleanstates(w_current);	
   
  +  if (w_current->inside_action) {
  +    object_list = w_current->page_current->complex_place_list;
  +  } else {
     object_list = w_current->page_current->selection_list;    
  +  }
   
     if (object_list) {
       i_update_middle_button(w_current,
                              i_callback_edit_mirror_hotkey, _("Mirror"));
   
  +    if (w_current->inside_action == 0) {
  +      /* Allow o_mirror to redraw the objects */
  +      w_current->DONT_REDRAW = 0;
       o_mirror(w_current, 
                object_list, 
                mouse_x, mouse_y);
     }
  +    else {
  +      o_drawbounding(w_current, NULL, object_list,
  +		     x_get_darkcolor(w_current->bb_color), TRUE);
  +      /* Don't allow o_rotate_90 to erase the selection, neither to
  +	 redraw the objects after rotating */
  +      /* skip over head node */
  +      redraw_state = w_current->DONT_REDRAW;
  +      w_current->DONT_REDRAW = 1;
  +      o_mirror(w_current, object_list,
  +	       fix_x(w_current, w_current->start_x),
  +	       fix_y(w_current, w_current->start_y));
  +      w_current->DONT_REDRAW = redraw_state;
   
  +      o_drawbounding(w_current, NULL, object_list,
  +		     x_get_darkcolor(w_current->bb_color), TRUE);
  +    }
  +  }
  +
  +  if (w_current->inside_action == 0) {
     w_current->event_state = SELECT;
     w_current->inside_action = 0;
  +  }
     i_update_toolbar(w_current);
   }
   
  
  
  


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