[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: gaf.git: branch: stable-1.8 updated (1.7.2-20111231-75-g037b21c)
The branch, stable-1.8 has been updated
via 037b21c18cb674ac50970e8474138b6809d3fcb6 (commit)
via e0140ecc98a57fc480a152717b53ac6fe5463611 (commit)
from 29b8540801de26686e9b282db5f987181aab2130 (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/include/prototype.h | 1 +
gschem/src/o_attrib.c | 53 +++++++++++++++++++++++++++++++++++--------
gschem/src/o_select.c | 20 ++++++++++++----
3 files changed, 59 insertions(+), 15 deletions(-)
=================
Commit Messages
=================
commit 037b21c18cb674ac50970e8474138b6809d3fcb6
Author: Nathan Schulte <nmschulte@xxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>
gschem: Fix formatting and code style
Affects-bug: lp-916234
:100644 100644 9fa1000... f37904f... M gschem/src/o_attrib.c
commit e0140ecc98a57fc480a152717b53ac6fe5463611
Author: Nathan Schulte <nmschulte@xxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>
gschem: Fix bug with selection and hidden attributes
Fixes a regression caused by 9b73a4c7f6f5e9dade0ddaca5aadc9ecb326bb5c.
When selecting an object via box selection it's invisible attributes
are now automatically selected as well.
Closes-bug: lp-916234
:100644 100644 45175f9... 42be9e0... M gschem/include/prototype.h
:100644 100644 378012b... 9fa1000... M gschem/src/o_attrib.c
:100644 100644 7db697a... 03cabcd... M gschem/src/o_select.c
=========
Changes
=========
commit 037b21c18cb674ac50970e8474138b6809d3fcb6
Author: Nathan Schulte <nmschulte@xxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>
gschem: Fix formatting and code style
Affects-bug: lp-916234
diff --git a/gschem/src/o_attrib.c b/gschem/src/o_attrib.c
index 9fa1000..f37904f 100644
--- a/gschem/src/o_attrib.c
+++ b/gschem/src/o_attrib.c
@@ -86,7 +86,7 @@ void o_attrib_add_selected(GSCHEM_TOPLEVEL *w_current, SELECTION *selection,
*
* \param [in] w_current The GSCHEM_TOPLEVEL object.
* \param [in,out] selection The SELECTION list to remove from.
- * \param [in] object The OBJECT whos invisible attributes to remove.
+ * \param [in] object The OBJECT whose invisible attributes to remove.
*/
void o_attrib_deselect_invisible (GSCHEM_TOPLEVEL *w_current,
SELECTION *selection,
@@ -97,15 +97,17 @@ void o_attrib_deselect_invisible (GSCHEM_TOPLEVEL *w_current,
g_assert( selection != NULL );
- if (w_current->toplevel->show_hidden_text)
+ if (w_current->toplevel->show_hidden_text) {
return;
+ }
for (a_iter = selected->attribs; a_iter != NULL;
a_iter = g_list_next (a_iter)) {
a_current = a_iter->data;
- if (a_current->selected && !o_is_visible(w_current->toplevel, a_current))
+ if (a_current->selected && !o_is_visible(w_current->toplevel, a_current)) {
o_selection_remove (w_current->toplevel, selection, a_current);
+ }
}
}
@@ -271,13 +273,10 @@ OBJECT *o_attrib_add_attrib(GSCHEM_TOPLEVEL *w_current,
break;
case(OBJ_TEXT):
-
world_x = o_current->text->x;
world_y = o_current->text->y;
-
color = DETACHED_ATTRIBUTE_COLOR;
-
- o_current = NULL;
+ o_current = NULL;
break;
}
} else {
@@ -295,9 +294,9 @@ OBJECT *o_attrib_add_attrib(GSCHEM_TOPLEVEL *w_current,
/* first create text item */
new_obj = o_text_new(toplevel, OBJ_TEXT, color, world_x, world_y,
- LOWER_LEFT, 0, /* zero is angle */
- text_string, w_current->text_size, /* current text size */
- visibility, show_name_value);
+ LOWER_LEFT, 0, text_string, /* zero is angle */
+ w_current->text_size, /* current text size */
+ visibility, show_name_value);
s_page_append (toplevel, toplevel->page_current, new_obj);
/* now attach the attribute to the object (if o_current is not NULL) */
commit e0140ecc98a57fc480a152717b53ac6fe5463611
Author: Nathan Schulte <nmschulte@xxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>
gschem: Fix bug with selection and hidden attributes
Fixes a regression caused by 9b73a4c7f6f5e9dade0ddaca5aadc9ecb326bb5c.
When selecting an object via box selection it's invisible attributes
are now automatically selected as well.
Closes-bug: lp-916234
diff --git a/gschem/include/prototype.h b/gschem/include/prototype.h
index 45175f9..42be9e0 100644
--- a/gschem/include/prototype.h
+++ b/gschem/include/prototype.h
@@ -483,6 +483,7 @@ void o_arc_draw_grips(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current);
/* o_attrib.c */
void o_attrib_add_selected(GSCHEM_TOPLEVEL *w_current, SELECTION *selection, OBJECT *selected);
void o_attrib_deselect_invisible(GSCHEM_TOPLEVEL *w_current, SELECTION *selection, OBJECT *selected);
+void o_attrib_select_invisible(GSCHEM_TOPLEVEL *w_current, SELECTION *selection, OBJECT *selected);
void o_attrib_toggle_visibility(GSCHEM_TOPLEVEL *w_current, OBJECT *object);
void o_attrib_toggle_show_name_value(GSCHEM_TOPLEVEL *w_current, OBJECT *object, int new_show_name_value);
OBJECT *o_attrib_add_attrib(GSCHEM_TOPLEVEL *w_current, const char *text_string, int visibility, int show_name_value, OBJECT *object);
diff --git a/gschem/src/o_attrib.c b/gschem/src/o_attrib.c
index 378012b..9fa1000 100644
--- a/gschem/src/o_attrib.c
+++ b/gschem/src/o_attrib.c
@@ -109,6 +109,40 @@ void o_attrib_deselect_invisible (GSCHEM_TOPLEVEL *w_current,
}
}
+/*! \brief Add invisible attributes of an object to the selection list.
+ * \par Function Description
+ *
+ * Add all invisible attributes attached to the given object
+ * to the selection list. If hidden text is being shown, this
+ * function returns immediately.
+ *
+ * \param [in] w_current The GSCHEM_TOPLEVEL object.
+ * \param [in,out] selection The SELECTION list to add to.
+ * \param [in] object The OBJECT whose invisible attributes to add.
+ */
+void o_attrib_select_invisible (GSCHEM_TOPLEVEL *w_current,
+ SELECTION *selection,
+ OBJECT *selected)
+{
+ OBJECT *a_current;
+ GList *a_iter;
+
+ g_assert( selection != NULL );
+
+ if (w_current->toplevel->show_hidden_text) {
+ return;
+ }
+
+ for (a_iter = selected->attribs; a_iter != NULL;
+ a_iter = g_list_next (a_iter)) {
+ a_current = a_iter->data;
+
+ if (!a_current->selected && !o_is_visible(w_current->toplevel, a_current)) {
+ o_selection_add (w_current->toplevel, selection, a_current);
+ }
+ }
+}
+
/*! \brief Change visibility status of attribute object.
* \par Function Description
* This function toggles the visibility status of the attribute \a
diff --git a/gschem/src/o_select.c b/gschem/src/o_select.c
index 7db697a..03cabcd 100644
--- a/gschem/src/o_select.c
+++ b/gschem/src/o_select.c
@@ -181,11 +181,21 @@ void o_select_object(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
o_attrib_deselect_invisible (w_current,
toplevel->page_current->selection_list,
o_current);
- /* Don't select attributes if the type is MULTIPLE, as this causes
- * issues with invert selection (CONTROLKEY pressed). */
- } else if( type != MULTIPLE) {
- o_attrib_add_selected (w_current, toplevel->page_current->selection_list,
- o_current);
+ } else {
+ /* If the type is MULTIPLE (meaning a select box was/is being used), only
+ * select invisible attributes on objects. Otherwise attributes will be
+ * "double selected", causing them to remain unselected if using
+ * invert-selection (CONTROLKEY is pressed)
+ */
+ if( type == MULTIPLE) {
+ o_attrib_select_invisible (w_current,
+ toplevel->page_current->selection_list,
+ o_current);
+ } else {
+ /* Select all attributes of the object for a single click select */
+ o_attrib_add_selected (w_current, toplevel->page_current->selection_list,
+ o_current);
+ }
}
}
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs