Revision: 76235 http://sourceforge.net/p/brlcad/code/76235 Author: starseeker Date: 2020-06-29 14:22:57 +0000 (Mon, 29 Jun 2020) Log Message: ----------- Write out a message when we're supposed to be line snapping
Modified Paths: -------------- brlcad/trunk/src/tclscripts/lib/Ged.tcl Modified: brlcad/trunk/src/tclscripts/lib/Ged.tcl =================================================================== --- brlcad/trunk/src/tclscripts/lib/Ged.tcl 2020-06-29 13:53:57 UTC (rev 76234) +++ brlcad/trunk/src/tclscripts/lib/Ged.tcl 2020-06-29 14:22:57 UTC (rev 76235) @@ -4331,7 +4331,6 @@ # and gridSnap is active, apply snap to grid to the data point # currently being moved. - # TODO - need to handle lines snapping in some fashion here as well... if {$point == "" && $itk_option(-gridSnap)} { # First, get the data point being moved. if {$mLastDataType == "data_labels" || $mLastDataType == "sdata_labels"} { @@ -4352,6 +4351,9 @@ lappend view $vZ set point [pane_v2m_point $_pane $view] } + if {$point == "" && !($itk_option(-gridSnap)) && $itk_option(-linesSnap)} { + puts "TODO: check for line snapping" + } # Replace the mLastDataIndex point with this point if {$point != ""} { @@ -4381,7 +4383,6 @@ ::itcl::body cadwidgets::Ged::end_data_poly_move {_pane} { refresh_off - # TODO - need to handle lines snapping in some fashion here as well... if {$itk_option(-gridSnap)} { # First, get the data point being moved. set point [eval $mGed data_polygons $itk_component($_pane) get_point $mLastDataIndex] @@ -4398,6 +4399,9 @@ # Replace the mLastDataIndex point with this point eval $mGed data_polygons $itk_component($_pane) replace_point $mLastDataIndex [list $point] } + if {!($itk_option(-gridSnap)) && $itk_option(-linesSnap)} { + puts "TODO: check for line snapping" + } if {[$mGed data_polygons $itk_component($_pane) moveall]} { foreach callback $mEndDataPolygonCallbacks { @@ -4463,12 +4467,15 @@ ::itcl::body cadwidgets::Ged::end_data_poly_circ {_pane {_button 1}} { $mGed idle_mode $itk_component($_pane) - # TODO - need to handle lines snapping in some fashion here as well... if {$itk_option(-gridSnap)} { set mpos [$mGed get_prev_mouse $itk_component($_pane)] eval $mGed mouse_poly_circ $itk_component($_pane) $mpos } + if {!($itk_option(-gridSnap)) && $itk_option(-linesSnap)} { + puts "TODO: check for line snapping" + } + set plist [$mGed data_polygons $itk_component($_pane) polygons] set ti [$mGed data_polygons $itk_component($_pane) target_poly] incr ti @@ -4487,13 +4494,16 @@ set mpos [$mGed get_prev_mouse $itk_component($_pane)] - # TODO - need to handle lines snapping in some fashion here as well... if {$itk_option(-gridSnap)} { set view [eval $mGed screen2view $itk_component($_pane) $mpos] set view [$mGed snap_view $itk_component($_pane) [lindex $view 0] [lindex $view 1]] set mpos [$mGed view2screen $itk_component($_pane) $view] } + if {!($itk_option(-gridSnap)) && $itk_option(-linesSnap)} { + puts "TODO: check for line snapping" + } + eval $mGed poly_cont_build $itk_component($_pane) $mpos $mGed poly_cont_build_end $itk_component($_pane) @@ -4513,12 +4523,15 @@ ::itcl::body cadwidgets::Ged::end_data_poly_ell {_pane {_button 1}} { $mGed idle_mode $itk_component($_pane) - # TODO - need to handle lines snapping in some fashion here as well... if {$itk_option(-gridSnap)} { set mpos [$mGed get_prev_mouse $itk_component($_pane)] eval $mGed mouse_poly_ell $itk_component($_pane) $mpos } + if {!($itk_option(-gridSnap)) && $itk_option(-linesSnap)} { + puts "TODO: check for line snapping" + } + set plist [$mGed data_polygons $itk_component($_pane) polygons] set ti [$mGed data_polygons $itk_component($_pane) target_poly] incr ti @@ -4535,12 +4548,15 @@ ::itcl::body cadwidgets::Ged::end_data_poly_rect {_pane {_button 1}} { $mGed idle_mode $itk_component($_pane) - # TODO - need to handle lines snapping in some fashion here as well... if {$itk_option(-gridSnap)} { set mpos [$mGed get_prev_mouse $itk_component($_pane)] eval $mGed mouse_poly_rect $itk_component($_pane) $mpos } + if {!($itk_option(-gridSnap)) && $itk_option(-linesSnap)} { + puts "TODO: check for line snapping" + } + set plist [$mGed data_polygons $itk_component($_pane) polygons] set ti [$mGed data_polygons $itk_component($_pane) target_poly] incr ti This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits