summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorAdrián Medraño Calvo <adrian@medranocalvo.com>2018-10-08 12:00:00 (GMT)
committerAdrián Medraño Calvo <adrian@medranocalvo.com>2018-10-08 12:00:00 (GMT)
commit4429a74a0d939048f8f2379db92a66102d8181ef (patch)
tree658e3bdb22d74773ce6f4f3cde416ba6be7e43eb /generic
parentfa194741f8b801f258aed9fbb6b1448dce97173b (diff)
downloadblt-4429a74a0d939048f8f2379db92a66102d8181ef.zip
blt-4429a74a0d939048f8f2379db92a66102d8181ef.tar.gz
blt-4429a74a0d939048f8f2379db92a66102d8181ef.tar.bz2
Correct element show command
The querying functionality was not implemented.
Diffstat (limited to 'generic')
-rw-r--r--generic/tkbltGrElemOp.C7
1 files changed, 6 insertions, 1 deletions
diff --git a/generic/tkbltGrElemOp.C b/generic/tkbltGrElemOp.C
index 7235a8e..1102c30 100644
--- a/generic/tkbltGrElemOp.C
+++ b/generic/tkbltGrElemOp.C
@@ -514,11 +514,16 @@ static int ShowOp(ClientData clientData, Tcl_Interp* interp,
int objc, Tcl_Obj* const objv[])
{
Graph* graphPtr = (Graph*)clientData;
- if (objc!=4) {
+ if (objc!=3 || objc!=4) {
Tcl_WrongNumArgs(interp, 3, objv, "?nameList?");
return TCL_ERROR;
}
+ if (objc == 3) {
+ Tcl_SetObjResult(interp, DisplayListObj(graphPtr));
+ return TCL_OK;
+ }
+
int elemObjc;
Tcl_Obj** elemObjv;
if (Tcl_ListObjGetElements(interp, objv[3], &elemObjc, &elemObjv) != TCL_OK)