diff options
author | joye <joye> | 2016-02-22 21:21:39 (GMT) |
---|---|---|
committer | joye <joye> | 2016-02-22 21:21:39 (GMT) |
commit | 410cbf6473d876536a07f9039aad3ea05ec28ade (patch) | |
tree | 3e077cc35b793cf3bf14efb61c94b68566651022 | |
parent | 383653ba395aa3cb70e1bfece125ac7d456b59ef (diff) | |
download | blt-410cbf6473d876536a07f9039aad3ea05ec28ade.zip blt-410cbf6473d876536a07f9039aad3ea05ec28ade.tar.gz blt-410cbf6473d876536a07f9039aad3ea05ec28ade.tar.bz2 |
*** empty log message ***
-rw-r--r-- | src/bltGraph.C | 9 | ||||
-rw-r--r-- | src/bltGraphBar.C | 11 | ||||
-rw-r--r-- | src/bltGraphLine.C | 11 |
3 files changed, 22 insertions, 9 deletions
diff --git a/src/bltGraph.C b/src/bltGraph.C index 6440201..615394f 100644 --- a/src/bltGraph.C +++ b/src/bltGraph.C @@ -79,10 +79,6 @@ Graph::Graph(ClientData clientData, Tcl_Interp* interp, flags = RESET; nextMarkerId_ = 1; - legend_ = new Legend(this); - crosshairs_ = new Crosshairs(this); - postscript_ = new Postscript(this); - inset_ =0; titleX_ =0; titleY_ =0; @@ -120,11 +116,6 @@ Graph::Graph(ClientData clientData, Tcl_Interp* interp, markers_.displayList = new Chain(); bindTable_ = new BindTable(this, this); - if (createAxes() != TCL_OK) { - valid_ =0; - return; - } - // Keep a hold of the associated tkwin until we destroy the graph, // otherwise Tk might free it while we still need it. Tcl_Preserve(tkwin_); diff --git a/src/bltGraphBar.C b/src/bltGraphBar.C index ed72e3d..eeab2e6 100644 --- a/src/bltGraphBar.C +++ b/src/bltGraphBar.C @@ -45,6 +45,7 @@ #include "bltGrMarker.h" #include "bltGrLegd.h" #include "bltGrHairs.h" +#include "bltGrPostscript.h" #include "bltGrDef.h" using namespace Blt; @@ -209,11 +210,21 @@ BarGraph::BarGraph(ClientData clientData, Tcl_Interp* interp, return; } + // do this last after Tk_SetClass set + legend_ = new Legend(this); + crosshairs_ = new Crosshairs(this); + postscript_ = new Postscript(this); + if (createPen("active", 0, NULL) != TCL_OK) { valid_ =0; return; } + if (createAxes() != TCL_OK) { + valid_ =0; + return; + } + adjustAxes(); Tcl_SetStringObj(Tcl_GetObjResult(interp_), Tk_PathName(tkwin_), -1); diff --git a/src/bltGraphLine.C b/src/bltGraphLine.C index 0e884d6..4fc510e 100644 --- a/src/bltGraphLine.C +++ b/src/bltGraphLine.C @@ -45,6 +45,7 @@ #include "bltGrMarker.h" #include "bltGrLegd.h" #include "bltGrHairs.h" +#include "bltGrPostscript.h" #include "bltGrDef.h" using namespace Blt; @@ -181,11 +182,21 @@ LineGraph::LineGraph(ClientData clientData, Tcl_Interp* interp, return; } + // do this last after Tk_SetClass set + legend_ = new Legend(this); + crosshairs_ = new Crosshairs(this); + postscript_ = new Postscript(this); + if (createPen("active", 0, NULL) != TCL_OK) { valid_ =0; return; } + if (createAxes() != TCL_OK) { + valid_ =0; + return; + } + adjustAxes(); Tcl_SetStringObj(Tcl_GetObjResult(interp_), Tk_PathName(tkwin_), -1); |