Revision: 54056
          http://brlcad.svn.sourceforge.net/brlcad/?rev=54056&view=rev
Author:   bob1961
Date:     2012-12-13 14:46:20 +0000 (Thu, 13 Dec 2012)
Log Message:
-----------
Updated SketchEditFrame::continue_circle_pick to handle the case where index1 
and index2 are the same after successfully picking a vertex.

Modified Paths:
--------------
    brlcad/trunk/src/tclscripts/archer/SketchEditFrame.tcl

Modified: brlcad/trunk/src/tclscripts/archer/SketchEditFrame.tcl
===================================================================
--- brlcad/trunk/src/tclscripts/archer/SketchEditFrame.tcl      2012-12-13 
13:54:55 UTC (rev 54055)
+++ brlcad/trunk/src/tclscripts/archer/SketchEditFrame.tcl      2012-12-13 
14:46:20 UTC (rev 54056)
@@ -883,9 +883,16 @@
            drawVertices
        }
     } else {
-       # At this point index1 refers to the last vertex in VL. Remove it.
-       set VL [lreplace $VL end end]
-       set index1 $index
+       if {$index != $index1} {
+           # At this point index1 refers to the last vertex in VL. Remove it.
+           set VL [lreplace $VL end end]
+           set index1 $index
+       } else {
+           # Here we have to add a vertex
+           set vert [lindex $VL $index]
+           set index1 [llength $VL]
+           lappend VL $vert
+       }
     }
 
     continue_circle $_segment 1 3 0 0
@@ -1332,7 +1339,6 @@
     set index [pick_vertex $_mx $_my]
     if {$index != -1} {
        set index1 $index
-       set index2 $index
     } else {
        if {$_coord_type == 1} {
            # screen coords
@@ -1346,12 +1352,11 @@
        }
 
        set index1 [llength $VL]
-       set index2 $index1
        lappend VL "$sx $sy"
-#      set index2 [llength $VL]
-#      lappend VL "$sx $sy"
     }
 
+    set index2 $index1
+
     set radius 0.0
     set new_seg [Sketch_carc \#auto $this $itk_component(canvas) "S $index1 E 
$index2 R -1 L 0 O 0"]
     lappend segments $new_seg

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to