summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)