summaryrefslogtreecommitdiffstats
path: root/tksao
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-10-22 17:07:24 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-10-22 17:07:24 (GMT)
commit8da5784b3e24ca5f40b380525ae3b15105b5c732 (patch)
treef1b12928d74d023e4f7164cf4699576440cba72e /tksao
parent4f3421cac475b13afa28b1bfcc2eed0ebff2237c (diff)
downloadblt-8da5784b3e24ca5f40b380525ae3b15105b5c732.zip
blt-8da5784b3e24ca5f40b380525ae3b15105b5c732.tar.gz
blt-8da5784b3e24ca5f40b380525ae3b15105b5c732.tar.bz2
new mask
Diffstat (limited to 'tksao')
-rw-r--r--tksao/frame/base.C1
-rw-r--r--tksao/frame/base.h3
-rw-r--r--tksao/frame/frame.C1
-rw-r--r--tksao/frame/frame3d.C1
-rw-r--r--tksao/frame/framergb.C14
-rw-r--r--tksao/frame/framergb.h4
-rw-r--r--tksao/frame/frload.C6
7 files changed, 19 insertions, 11 deletions
diff --git a/tksao/frame/base.C b/tksao/frame/base.C
index e6ad19e..e0e97e4 100644
--- a/tksao/frame/base.C
+++ b/tksao/frame/base.C
@@ -70,7 +70,6 @@ Base::Base(Tcl_Interp* i, Tk_Canvas c, Tk_Item* item)
currentContext = NULL;
keyContext = NULL;
- keyContextSet =0;
orientation = Coord::NORMAL;
zoom_ = Vector(1,1);
diff --git a/tksao/frame/base.h b/tksao/frame/base.h
index 400103e..a90ba0a 100644
--- a/tksao/frame/base.h
+++ b/tksao/frame/base.h
@@ -170,7 +170,6 @@ public:
Context* currentContext;
Context* keyContext;
- int keyContextSet;
Coord::Orientation orientation; // current image orientation
Matrix orientationMatrix; // current image orientation matrix
@@ -383,7 +382,7 @@ public:
virtual int isFrame3d() {return 0;}
virtual int isFrameRGB() {return 0;}
- void loadDone(int, LayerType);
+ virtual void loadDone(int, LayerType);
void markerAnalysisHistogram(Marker*, double**, double**, const BBox&, int);
int markerAnalysisPlot2d(Marker*, double**, double**, double**, double**,
diff --git a/tksao/frame/frame.C b/tksao/frame/frame.C
index 15d701d..f8cb555 100644
--- a/tksao/frame/frame.C
+++ b/tksao/frame/frame.C
@@ -20,7 +20,6 @@ Frame::Frame(Tcl_Interp* i, Tk_Canvas c, Tk_Item* item)
currentContext = context;
keyContext = context;
- keyContextSet =1;
colormapData =NULL;
diff --git a/tksao/frame/frame3d.C b/tksao/frame/frame3d.C
index 7fef84f..01e07a7 100644
--- a/tksao/frame/frame3d.C
+++ b/tksao/frame/frame3d.C
@@ -27,7 +27,6 @@ Frame3d::Frame3d(Tcl_Interp* i, Tk_Canvas c, Tk_Item* item)
currentContext = context;
keyContext = context;
- keyContextSet =1;
cmapID = 1;
bias = 0.5;
diff --git a/tksao/frame/framergb.C b/tksao/frame/framergb.C
index 89942c3..a71dd23 100644
--- a/tksao/frame/framergb.C
+++ b/tksao/frame/framergb.C
@@ -659,6 +659,20 @@ void FrameRGB::loadRGBFinish()
update(MATRIX);
}
+void FrameRGB::loadDone(int rr, LayerType ll)
+{
+ if (rr) {
+ if (ll == IMG) {
+ if (!keyContextSet) {
+ keyContext = currentContext;
+ keyContextSet =1;
+ }
+ }
+
+ Base::loadDone(rr, ll);
+ }
+}
+
// waj
void FrameRGB::pushMatrices()
{
diff --git a/tksao/frame/framergb.h b/tksao/frame/framergb.h
index 4c4c7f1..a862636 100644
--- a/tksao/frame/framergb.h
+++ b/tksao/frame/framergb.h
@@ -27,6 +27,8 @@ class FrameRGB : public FrameBase {
int colorCount; // number of dynamic colors
unsigned char* colorCells; // current color values
+ int keyContextSet;
+
private:
void alignWCS();
void alignWCS(Coord::CoordSystem, Coord::SkyFrame);
@@ -58,6 +60,8 @@ class FrameRGB : public FrameBase {
protected:
int isFrameRGB() {return 1;}
+ void loadDone(int, LayerType);
+
unsigned char* fillImage(int, int, Coord::InternalSystem);
void updateColorCells(unsigned char*, int);
void updateColorScale();
diff --git a/tksao/frame/frload.C b/tksao/frame/frload.C
index c30a97f..a0c2184 100644
--- a/tksao/frame/frload.C
+++ b/tksao/frame/frload.C
@@ -714,12 +714,6 @@ void Base::loadMosaicImageWFPC2VarCmd(const char* ch, const char* fn)
void Base::loadDone(int rr, LayerType ll)
{
if (rr) {
- if (ll == IMG) {
- if (!keyContextSet) {
- keyContext = currentContext;
- keyContextSet =1;
- }
- }
alignWCS();
if (!preservePan) {
centerImage();