summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorAdrián Medraño Calvo <adrian@medranocalvo.com>2017-07-27 10:39:37 (GMT)
committerAdrián Medraño Calvo <adrian@medranocalvo.com>2017-07-27 10:42:00 (GMT)
commit04d02fd58bb008b716d7a866832195d780239ed4 (patch)
tree830c3284171ea43a6fbf00821da774cf0a09741c /generic
parent452da1d8fcad3530dcfd10473aa8c39bf3bf3e0e (diff)
downloadblt-04d02fd58bb008b716d7a866832195d780239ed4.zip
blt-04d02fd58bb008b716d7a866832195d780239ed4.tar.gz
blt-04d02fd58bb008b716d7a866832195d780239ed4.tar.bz2
Use axis' own classid to determine the type
Diffstat (limited to 'generic')
-rw-r--r--generic/tkbltGrAxisOp.C8
1 files changed, 6 insertions, 2 deletions
diff --git a/generic/tkbltGrAxisOp.C b/generic/tkbltGrAxisOp.C
index 196d29a..e467d53 100644
--- a/generic/tkbltGrAxisOp.C
+++ b/generic/tkbltGrAxisOp.C
@@ -555,10 +555,14 @@ int AxisTypeOp(Axis* axisPtr, Tcl_Interp* interp,
{
const char* typeName = "";
if (axisPtr->use_) {
- if (axisNames[axisPtr->margin_].classId == CID_AXIS_X)
+ switch (axisPtr->classId_) {
+ case CID_AXIS_X:
typeName = "x";
- else if (axisNames[axisPtr->margin_].classId == CID_AXIS_Y)
+ break;
+ case CID_AXIS_Y:
typeName = "y";
+ break;
+ }
}
Tcl_SetStringObj(Tcl_GetObjResult(interp), typeName, -1);