[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: gaf.git: branch: master updated (1.5.0-20080706-58-gd3b7598)
The branch, master has been updated
via d3b75982a9507c05cb2699ae9d875fa344608196 (commit)
from 0eea7587957ef3e01c2d1942d7bc6c940c237e4a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
gschem/src/i_callbacks.c | 46 ++++++++++++------------------
gschem/src/x_event.c | 70 +++++++++++++++++-----------------------------
2 files changed, 44 insertions(+), 72 deletions(-)
=================
Commit Messages
=================
commit d3b75982a9507c05cb2699ae9d875fa344608196
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Tue Jul 29 03:11:27 2008 +0100
Add support for rotating whilst placing
Due to the consolidation of the OBJECT place code, rotation can now
work across uniformly various different placemenet actions.
:100644 100644 fe866f5... d0b81a2... M gschem/src/i_callbacks.c
:100644 100644 184e285... 604ac3b... M gschem/src/x_event.c
=========
Changes
=========
commit d3b75982a9507c05cb2699ae9d875fa344608196
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Tue Jul 29 03:11:27 2008 +0100
Add support for rotating whilst placing
Due to the consolidation of the OBJECT place code, rotation can now
work across uniformly various different placemenet actions.
diff --git a/gschem/src/i_callbacks.c b/gschem/src/i_callbacks.c
index fe866f5..d0b81a2 100644
--- a/gschem/src/i_callbacks.c
+++ b/gschem/src/i_callbacks.c
@@ -809,20 +809,15 @@ DEFINE_I_CALLBACK(edit_rotate_90)
exit_if_null(w_current);
- /* Rotating inside a copy action is still not
- supported. In these cases, do nothing */
- if ( (w_current->inside_action) &&
- ((w_current->event_state == ENDCOPY) ||
- (w_current->event_state == ENDMCOPY)) )
- {
- return;
- }
-
- /* If inside a move action, send a button 3 released, so rotating
- will be handled by x_event.c */
- if ( (w_current->inside_action) &&
- ((w_current->event_state == ENDMOVE)) )
- {
+ /* If inside an appropriate action, send a button 2 released,
+ * so rotating will be handled by x_event.c */
+ if ( w_current->inside_action &&
+ (w_current->event_state == ENDCOMP ||
+ w_current->event_state == ENDTEXT ||
+ w_current->event_state == ENDMOVE ||
+ w_current->event_state == ENDCOPY ||
+ w_current->event_state == ENDMCOPY ||
+ w_current->event_state == ENDPASTE )) {
GdkEvent* event;
event = gdk_event_new(GDK_BUTTON_RELEASE);
@@ -851,23 +846,18 @@ DEFINE_I_CALLBACK(edit_rotate_90_hotkey)
exit_if_null(w_current);
- /* Rotating inside a copy action is still not
- supported. In these cases, do nothing */
- if ( (w_current->inside_action) &&
- ((w_current->event_state == ENDCOPY) ||
- (w_current->event_state == ENDMCOPY)) )
- {
- return;
- }
-
if (!x_event_get_pointer_position(w_current, TRUE, &wx, &wy))
return;
- /* If inside a move action, send a button 3 released, so rotating
- will be handled by x_event.c */
- if ( (w_current->inside_action) &&
- ((w_current->event_state == ENDMOVE)) )
- {
+ /* If inside an appropriate action, send a button 2 released,
+ * so rotating will be handled by x_event.c */
+ if ( w_current->inside_action &&
+ (w_current->event_state == ENDCOMP ||
+ w_current->event_state == ENDTEXT ||
+ w_current->event_state == ENDMOVE ||
+ w_current->event_state == ENDCOPY ||
+ w_current->event_state == ENDMCOPY ||
+ w_current->event_state == ENDPASTE )) {
GdkEvent* event;
event = gdk_event_new(GDK_BUTTON_RELEASE);
diff --git a/gschem/src/x_event.c b/gschem/src/x_event.c
index 184e285..604ac3b 100644
--- a/gschem/src/x_event.c
+++ b/gschem/src/x_event.c
@@ -347,7 +347,8 @@ gint x_event_button_pressed(GtkWidget *widget, GdkEventButton *event,
w_current->event_state == ENDTEXT ||
w_current->event_state == ENDMOVE ||
w_current->event_state == ENDCOPY ||
- w_current->event_state == ENDMCOPY) {
+ w_current->event_state == ENDMCOPY ||
+ w_current->event_state == ENDPASTE ) {
return(0);
} else {
i_callback_cancel(w_current, 0, NULL);
@@ -512,7 +513,6 @@ gint x_event_button_released(GtkWidget *widget, GdkEventButton *event,
{
TOPLEVEL *toplevel = w_current->toplevel;
int prev_state;
- int redraw_state;
int w_x, w_y;
int unsnapped_wx, unsnapped_wy;
@@ -613,55 +613,37 @@ gint x_event_button_released(GtkWidget *widget, GdkEventButton *event,
} else if (event->button == 2) {
if (w_current->inside_action) {
- if (w_current->event_state == ENDCOMP) {
- o_place_rubberplace_xor (w_current, FALSE);
-
- o_place_rotate(w_current);
-
- /* Run the complex place list changed hook without redrawing */
- /* since all objects are being redrawn afterwards */
- prev_state = toplevel->DONT_REDRAW;
- toplevel->DONT_REDRAW = 1;
- o_complex_place_changed_run_hook (w_current);
- toplevel->DONT_REDRAW = prev_state;
+ if (w_current->event_state == ENDCOMP ||
+ w_current->event_state == ENDTEXT ||
+ w_current->event_state == ENDMOVE ||
+ w_current->event_state == ENDCOPY ||
+ w_current->event_state == ENDMCOPY ||
+ w_current->event_state == ENDPASTE ) {
- o_place_rubberplace_xor (w_current, TRUE);
- return(0);
- } else if (w_current->event_state == ENDTEXT) {
- o_place_rubberplace_xor (w_current, FALSE);
+ if (w_current->event_state == ENDMOVE) {
+ o_move_rubbermove_xor (w_current, FALSE);
+ } else {
+ o_place_rubberplace_xor (w_current, FALSE);
+ }
o_place_rotate(w_current);
- o_place_rubberplace_xor (w_current, TRUE);
- return(0);
-
- }
- else if (w_current->event_state == ENDMOVE) {
- prev_state = w_current->event_state;
-
- o_move_rubbermove_xor (w_current, FALSE);
-
- /* Don't allow o_rotate_90 to erase the selection, neither to
- redraw the objects after rotating */
- /* skip over head node */
- redraw_state = toplevel->DONT_REDRAW;
- toplevel->DONT_REDRAW = 1;
- o_rotate_world_update(w_current, w_current->first_wx,
- w_current->first_wy, 90,
- toplevel->page_current->place_list );
- toplevel->DONT_REDRAW = redraw_state;
- w_current->event_state = prev_state;
-
- o_move_rubbermove_xor (w_current, TRUE);
+ if (w_current->event_state == ENDCOMP) {
+ /* Run the complex place list changed hook without redrawing */
+ /* since all objects are being redrawn afterwards */
+ prev_state = toplevel->DONT_REDRAW;
+ toplevel->DONT_REDRAW = 1;
+ o_complex_place_changed_run_hook (w_current);
+ toplevel->DONT_REDRAW = prev_state;
+ }
+ if (w_current->event_state == ENDMOVE) {
+ o_move_rubbermove_xor (w_current, TRUE);
+ } else {
+ o_place_rubberplace_xor (w_current, TRUE);
+ }
return(0);
}
- else if ((w_current->event_state == ENDCOPY) ||
- (w_current->event_state == ENDMCOPY)) {
- /* Rotating while copying is still not supported, so do nothing */
- return 0;
- }
-
}
switch(w_current->middle_button) {
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs