diff options
author | lecoanet | 2001-06-25 11:20:38 +0000 |
---|---|---|
committer | lecoanet | 2001-06-25 11:20:38 +0000 |
commit | 730bce3111c29b553459e84f6af396c6186c7151 (patch) | |
tree | 5cc0d9bd0f1602df5df19c4e1fdb687c6b08aed9 /generic/Tabular.c | |
parent | a3adeee4ca08764b8e78282c4b1cd57a0d830c0d (diff) | |
download | tkzinc-730bce3111c29b553459e84f6af396c6186c7151.zip tkzinc-730bce3111c29b553459e84f6af396c6186c7151.tar.gz tkzinc-730bce3111c29b553459e84f6af396c6186c7151.tar.bz2 tkzinc-730bce3111c29b553459e84f6af396c6186c7151.tar.xz |
Correction d'un bug de sensibilite
Diffstat (limited to 'generic/Tabular.c')
-rw-r--r-- | generic/Tabular.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/generic/Tabular.c b/generic/Tabular.c index 1cbe425..5a0acb4 100644 --- a/generic/Tabular.c +++ b/generic/Tabular.c @@ -350,7 +350,12 @@ IsSensitive(Item item, !item->parent->class->IsSensitive(item->parent, ZN_NO_PART)) { return False; } - return ITEM_P.IsFieldSensitive(&((TabularItem) item)->field_set, item_part); + if (item_part == ZN_NO_PART) { + return ISSET(item->flags, SENSITIVE_BIT); + } + else { + return ITEM_P.IsFieldSensitive(&((TabularItem) item)->field_set, item_part); + } } @@ -374,9 +379,12 @@ Pick(Item item, double dist; dist = ITEM_P.FieldsPick(&((TabularItem) item)->field_set, p, &best_part); - /* printf("tabular %d reporting part %d, distance %lf\n", - item->id, best_part, dist); */ - + /*printf("tabular %d reporting part %d, distance %lf\n", + item->id, best_part, dist);*/ + if (dist <= 0.0) { + dist = 0.0; + } + *part = best_part; return dist; } |