[dia] UML Lifeline: allowed to delete one connection point too much
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] UML Lifeline: allowed to delete one connection point too much
- Date: Wed, 3 Oct 2012 20:03:42 +0000 (UTC)
commit 465be40fe16ff964035018e9e5b3c03a1291d166
Author: Hans Breuer <hans breuer org>
Date: Tue Oct 2 21:09:04 2012 +0200
UML Lifeline: allowed to delete one connection point too much
found by the recently added get_object_menu() unit test.
objects/UML/lifeline.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/objects/UML/lifeline.c b/objects/UML/lifeline.c
index 8d472c6..92060d2 100644
--- a/objects/UML/lifeline.c
+++ b/objects/UML/lifeline.c
@@ -555,10 +555,11 @@ lifeline_get_object_menu(Lifeline *lifeline, Point *clickedpoint)
lifeline->southeast->num_connections) );
object_menu_items[0].active = 1;
+ /* don't allow to remove the last connection point */
if (lifeline_point_above_mid (lifeline, clickedpoint))
- object_menu_items[1].active = (lifeline->northeast->num_connections > 0);
+ object_menu_items[1].active = (lifeline->northeast->num_connections > 1);
else
- object_menu_items[1].active = (lifeline->southeast->num_connections > 0);
+ object_menu_items[1].active = (lifeline->southeast->num_connections > 1);
return &object_menu;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]