]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/gtkmathview-bonobo/src/handlers.c
* completed implementation of View interface
[helm.git] / helm / gtkmathview-bonobo / src / handlers.c
index 485ad0183ad1ecadde2f5119e09b01cca7b92eb9..cca4f1e9e51fa82b5c798b62e2d434a8ecc2bc90 100644 (file)
@@ -69,9 +69,9 @@ select_begin_cb(GtkMathView* math_view, GdomeElement* elem, gint state,
          control_data->root_selected = NULL;
        }
       
-      if (control_data->semantic_selection)
+      if (control_data->id_ns_uri != NULL || control_data->id_name != NULL)
        {
-         GdomeElement* new_elem = find_xref_element(elem);
+         GdomeElement* new_elem = find_element_with_id(elem, control_data->id_ns_uri, control_data->id_name);
          if (new_elem != NULL)
            {
              gdome_el_ref(new_elem, &exc);
@@ -116,12 +116,12 @@ select_over_cb(GtkMathView* math_view, GdomeElement* elem, gint state,
           control_data->root_selected = NULL;
        }
       
-      if (control_data->semantic_selection)
+      if (control_data->id_ns_uri != NULL || control_data->id_name != NULL)
        {
          GdomeElement* new_root = find_common_ancestor(control_data->first_selected, elem);
          if (new_root != NULL)
            {
-             control_data->root_selected = find_xref_element(new_root);
+             control_data->root_selected = find_element_with_id(new_root, control_data->id_ns_uri, control_data->id_name);
              gdome_el_unref(new_root, &exc);
              g_assert(exc == 0);
            }