summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bltGrAxis.C4
-rw-r--r--src/bltGrAxis.h6
-rw-r--r--src/bltGrAxisOp.C4
-rw-r--r--src/bltGrXAxisOp.C4
4 files changed, 6 insertions, 12 deletions
diff --git a/src/bltGrAxis.C b/src/bltGrAxis.C
index e3d9e06..7b2e18d 100644
--- a/src/bltGrAxis.C
+++ b/src/bltGrAxis.C
@@ -181,7 +181,7 @@ static Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_END, NULL, NULL, NULL, NULL, -1, 0, 0, NULL, 0}
};
-Axis::Axis(Graph* graphPtr, const char* name, int margin)
+Axis::Axis(Graph* graphPtr, const char* name, int margin, Tcl_HashEntry* hPtr)
{
ops_ = (AxisOptions*)calloc(1, sizeof(AxisOptions));
AxisOptions* ops = (AxisOptions*)ops_;
@@ -192,7 +192,7 @@ Axis::Axis(Graph* graphPtr, const char* name, int margin)
className_ = dupstr("none");
use_ =0;
- hashPtr_ =NULL;
+ hashPtr_ = hPtr;
flags =0;
/* Fields specific to axes. */
diff --git a/src/bltGrAxis.h b/src/bltGrAxis.h
index 06471ef..f788c02 100644
--- a/src/bltGrAxis.h
+++ b/src/bltGrAxis.h
@@ -156,8 +156,6 @@ class Axis {
Tcl_HashEntry* hashPtr_;
unsigned int flags;
- // Fields specific to axes
-
const char *detail_;
int refCount_;
Point2d titlePos_;
@@ -176,8 +174,6 @@ class Axis {
TickSweep minorSweep_;
TickSweep majorSweep_;
- // The following fields are specific to logical axes
-
int margin_;
Blt_ChainLink link;
Blt_Chain chain;
@@ -212,7 +208,7 @@ class Axis {
void offsets(int, int, AxisInfo*);
public:
- Axis(Graph*, const char*, int);
+ Axis(Graph*, const char*, int, Tcl_HashEntry*);
virtual ~Axis();
ClassId classId() {return classId_;}
diff --git a/src/bltGrAxisOp.C b/src/bltGrAxisOp.C
index ed9a78e..13c073a 100644
--- a/src/bltGrAxisOp.C
+++ b/src/bltGrAxisOp.C
@@ -314,10 +314,10 @@ static int CreateAxis(Tcl_Interp* interp, Graph* graphPtr,
return TCL_ERROR;
}
- Axis* axisPtr = new Axis(graphPtr, Tcl_GetString(objv[3]), MARGIN_NONE);
+ Axis* axisPtr = new Axis(graphPtr, Tcl_GetString(objv[3]), MARGIN_NONE, hPtr);
if (!axisPtr)
return TCL_ERROR;
- axisPtr->hashPtr_ = hPtr;
+
Tcl_SetHashValue(hPtr, axisPtr);
if ((Tk_InitOptions(graphPtr->interp, (char*)axisPtr->ops(), axisPtr->optionTable(), graphPtr->tkwin) != TCL_OK) || (AxisObjConfigure(interp, axisPtr, objc-4, objv+4) != TCL_OK)) {
diff --git a/src/bltGrXAxisOp.C b/src/bltGrXAxisOp.C
index 4ec5d6c..7a697dc 100644
--- a/src/bltGrXAxisOp.C
+++ b/src/bltGrXAxisOp.C
@@ -65,16 +65,14 @@ int Blt_CreateAxes(Graph* graphPtr)
Tcl_CreateHashEntry(&graphPtr->axes.table, axisNames[ii].name, &isNew);
Blt_Chain chain = Blt_Chain_Create();
- Axis* axisPtr = new Axis(graphPtr, axisNames[ii].name, ii);
+ Axis* axisPtr = new Axis(graphPtr, axisNames[ii].name, ii, hPtr);
if (!axisPtr)
return TCL_ERROR;
AxisOptions* ops = (AxisOptions*)axisPtr->ops();
- axisPtr->hashPtr_ = hPtr;
Tcl_SetHashValue(hPtr, axisPtr);
axisPtr->refCount_ = 1;
- axisPtr->margin_ = ii;
axisPtr->use_ =1;
axisPtr->setClass(!(ii&1) ? CID_AXIS_X : CID_AXIS_Y);