- magic wand: when flood-selecting surfaces, also pick any matching conditional lines

Mon, 07 Jul 2014 15:38:45 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Mon, 07 Jul 2014 15:38:45 +0300
changeset 833
ad681d97d341
parent 832
5c751af82f35
child 834
3e697ba996e8

- magic wand: when flood-selecting surfaces, also pick any matching conditional lines

src/editmodes/magicWandMode.cc file | annotate | diff | comparison | revisions
--- a/src/editmodes/magicWandMode.cc	Mon Jul 07 02:13:31 2014 +0300
+++ b/src/editmodes/magicWandMode.cc	Mon Jul 07 15:38:45 2014 +0300
@@ -46,7 +46,7 @@
 	// of candidates.
 	for (auto it = candidates.begin(); it != candidates.end(); ++it)
 	{
-		if ((*it)->type() != OBJ_Line || (*it)->vertex (0) == (*it)->vertex (1))
+		if (not eq ((*it)->type(), OBJ_Line, OBJ_CondLine) || (*it)->vertex (0) == (*it)->vertex (1))
 			continue;
 
 		int matches = 0;
@@ -58,8 +58,13 @@
 
 			if (++matches == 2)
 			{
-				// Boundary found. Add to boundaries list and get it off the candidates list.
-				boundaries.append (std::make_tuple ((*it)->vertex (0), (*it)->vertex (1)));
+				// Boundary found. If it's an edgeline, add it to the boundaries list, if a
+				// conditional line, select it.
+				if ((*it)->type() == OBJ_CondLine)
+					_selection << *it;
+				else
+					boundaries.append (std::make_tuple ((*it)->vertex (0), (*it)->vertex (1)));
+
 				break;
 			}
 		}

mercurial