diff options
author | joye <joye> | 2014-04-18 18:42:28 (GMT) |
---|---|---|
committer | joye <joye> | 2014-04-18 18:42:28 (GMT) |
commit | 1c0ee170a39938089568f5ad22be530e6a52a773 (patch) | |
tree | 7fcd32f001b2f2355643fb9163c5acfc47b194ac /src/bltGrAxisOp.C | |
parent | 1fc89f60af8b4cfe4f7b189fb68bae0eaad1642d (diff) | |
download | blt-1c0ee170a39938089568f5ad22be530e6a52a773.zip blt-1c0ee170a39938089568f5ad22be530e6a52a773.tar.gz blt-1c0ee170a39938089568f5ad22be530e6a52a773.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'src/bltGrAxisOp.C')
-rw-r--r-- | src/bltGrAxisOp.C | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/bltGrAxisOp.C b/src/bltGrAxisOp.C index e43b925..31cb091 100644 --- a/src/bltGrAxisOp.C +++ b/src/bltGrAxisOp.C @@ -406,11 +406,10 @@ static int DeleteOp(Tcl_Interp* interp, Graph* graphPtr, if (graphPtr->getAxis(objv[3], &axisPtr) != TCL_OK) return TCL_ERROR; - axisPtr->flags |= DELETE_PENDING; - if (axisPtr->refCount_ == 0) { - Tcl_EventuallyFree(axisPtr, FreeAxis); - graphPtr->eventuallyRedraw(); - } + if (axisPtr->refCount_ == 0) + delete axisPtr; + + graphPtr->eventuallyRedraw(); return TCL_OK; } @@ -496,9 +495,6 @@ static int NamesOp(Tcl_Interp* interp, Graph* graphPtr, Tcl_HashSearch cursor; for (Tcl_HashEntry *hPtr = Tcl_FirstHashEntry(&graphPtr->axes_.table, &cursor); hPtr; hPtr = Tcl_NextHashEntry(&cursor)) { Axis* axisPtr = (Axis*)Tcl_GetHashValue(hPtr); - if (axisPtr->flags & DELETE_PENDING) - continue; - Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewStringObj(axisPtr->name_, -1)); } } @@ -588,12 +584,6 @@ int Blt_AxisOp(Graph* graphPtr, Tcl_Interp* interp, // Support -void FreeAxis(char* data) -{ - Axis* axisPtr = (Axis*)data; - delete axisPtr; -} - Axis *Blt_GetFirstAxis(Blt_Chain chain) { Blt_ChainLink link = Blt_Chain_FirstLink(chain); |