From 2c13cc9718350e515765cd41d2690a96d4444d0d Mon Sep 17 00:00:00 2001 From: Chris Webster Date: Thu, 21 Apr 2022 09:33:06 -0600 Subject: [PATCH] Fix XY, XYZ and diff autoscale button response The autoscale and autotics buttons both have multiple callbacks. Turns out the order of the callbacks was important. Worked for main time-series plot, others the order was backwards. --- ed_diff.c | 2 +- ed_xy.c | 4 ++-- ed_xyz.c | 4 ++-- fbr.h | 2 +- ncplot.spec | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ed_diff.c b/ed_diff.c index 6bcf9f2..9630a65 100644 --- a/ed_diff.c +++ b/ed_diff.c @@ -136,9 +136,9 @@ static void CreateDiffParmsWindow() XtManageChild(RC[4]); XtAddCallback(autoScaleButton, XmNvalueChangedCallback, SetDiffAutoScale, NULL); + XtAddCallback(autoTicsButton, XmNvalueChangedCallback, SetDiffAutoTics, NULL); XtAddCallback(autoTicsButton, XmNvalueChangedCallback, ApplyDiffParms, NULL); XtAddCallback(autoScaleButton, XmNvalueChangedCallback, ApplyDiffParms, NULL); - XtAddCallback(autoTicsButton, XmNvalueChangedCallback, SetDiffAutoTics, NULL); for (i = 0; i < TOTAL_PARMS-1; ++i) if (parmsText[i]) diff --git a/ed_xy.c b/ed_xy.c index 39494b0..b854865 100644 --- a/ed_xy.c +++ b/ed_xy.c @@ -162,10 +162,10 @@ static void CreateXYParmsWindow() XtManageChild(RC[2]); XtManageChild(RC[3]); XtManageChild(RC[4]); - XtAddCallback(autoScaleButton, XmNvalueChangedCallback, ApplyXYParms, NULL); XtAddCallback(autoScaleButton, XmNvalueChangedCallback, SetXYAutoScale, NULL); - XtAddCallback(autoTicsButton, XmNvalueChangedCallback, ApplyXYParms, NULL); XtAddCallback(autoTicsButton, XmNvalueChangedCallback, SetXYAutoTics, NULL); + XtAddCallback(autoScaleButton, XmNvalueChangedCallback, ApplyXYParms, NULL); + XtAddCallback(autoTicsButton, XmNvalueChangedCallback, ApplyXYParms, NULL); for (i = 0; i < TOTAL_PARMS-1; ++i) if (parmsText[i]) diff --git a/ed_xyz.c b/ed_xyz.c index e34431c..457cfaa 100644 --- a/ed_xyz.c +++ b/ed_xyz.c @@ -128,10 +128,10 @@ static void CreateTrackParmsWindow() XtManageChild(RC[2]); XtManageChild(RC[3]); XtManageChild(RC[4]); - XtAddCallback(autoScaleButton, XmNvalueChangedCallback, ApplyTrackParms, NULL); - XtAddCallback(autoTicsButton, XmNvalueChangedCallback, ApplyTrackParms, NULL); XtAddCallback(autoScaleButton, XmNvalueChangedCallback, SetTrackAutoScale, NULL); XtAddCallback(autoTicsButton, XmNvalueChangedCallback, SetTrackAutoTics, NULL); + XtAddCallback(autoScaleButton, XmNvalueChangedCallback, ApplyTrackParms, NULL); + XtAddCallback(autoTicsButton, XmNvalueChangedCallback, ApplyTrackParms, NULL); for (i = 0; i < TOTAL_PARMS-1; ++i) if (parmsText[i]) diff --git a/fbr.h b/fbr.h index e2c1bce..cac96cc 100644 --- a/fbr.h +++ b/fbr.h @@ -54,7 +54,7 @@ static String fallback_resources[] = "*XmTextField.foreground: black", "*XmForm.horizontalSpacing: 4", "*XmForm.verticalSpacing: 4", - "*topLevelShell.title: ncplot 4.9.13", + "*topLevelShell.title: ncplot 4.9.14", "*topLevelShell.iconName: ncplot", "*topLevelShell.allowShellResize: True", "*topLevelShell.x: 0", diff --git a/ncplot.spec b/ncplot.spec index d420f79..3841bc4 100644 --- a/ncplot.spec +++ b/ncplot.spec @@ -1,7 +1,7 @@ Summary: Spec file for ncplot Name: ncplot Version: 4.9 -Release: 13%{?dist} +Release: 14%{?dist} License: GPL Group: System Environment/Daemons Url: http://www.eol.ucar.edu/