Revision: 76306
          http://sourceforge.net/p/brlcad/code/76306
Author:   brlcad
Date:     2020-07-10 07:27:36 +0000 (Fri, 10 Jul 2020)
Log Message:
-----------
display a warning if the user just clicks the ok or apply button, instead of 
proceeding to attempt to create an empty-name combination.

Modified Paths:
--------------
    brlcad/trunk/src/tclscripts/mged/comb.tcl

Modified: brlcad/trunk/src/tclscripts/mged/comb.tcl
===================================================================
--- brlcad/trunk/src/tclscripts/mged/comb.tcl   2020-07-10 07:18:22 UTC (rev 
76305)
+++ brlcad/trunk/src/tclscripts/mged/comb.tcl   2020-07-10 07:27:36 UTC (rev 
76306)
@@ -874,6 +874,14 @@
 
     set top .$id.comb
 
+    if {$comb_control($id,name) == ""} {
+       cad_dialog $::tk::Priv(cad_dialog) $mged_gui($id,screen)\
+           "You must specify a region/combination name!"\
+           "You must specify a region/combination name!"\
+           "" 0 OK
+       return
+    }
+
     # get the Boolean expression from the text widget
     set comb_control($id,comb) [$top.combT get 0.0 end]
 
@@ -946,7 +954,7 @@
            "" 0 OK
     }
 
-    # set any attributes that we have saved
+    # set any attributes we had saved
     catch {eval attr set $comb_control($id,name) $comb_control($id,attrs) }
 
     return $ret
@@ -1024,7 +1032,6 @@
     # save the attributes
     set comb_control($id,attrs) $tmp_comb_attrs
 
-
     # set all our data variables for the editor
     set comb_control($id,color) [lindex $comb_defs 1]
     set comb_control($id,shader) [lindex $comb_defs 2]

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



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to