From 2619129a31566583db5780b1c519c4ea00f8d6d2 Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Mon, 3 Jun 2024 15:13:16 +0300 Subject: [PATCH] Revert "changes to the code" This reverts commit cba11a6b8e3d226566d86d7d71544dfe8032d486. --- instat/dlgBoxPlot.vb | 32 ++++++-------------------------- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/instat/dlgBoxPlot.vb b/instat/dlgBoxPlot.vb index 8b58288e336..d0f7c6a00a0 100644 --- a/instat/dlgBoxPlot.vb +++ b/instat/dlgBoxPlot.vb @@ -125,7 +125,7 @@ Public Class dlgBoxplot ucrPnlPlots.AddFunctionNamesCondition(rdoBoxplotTufte, {"geom_boxplot", "geom_tufteboxplot"}) ucrPnlPlots.AddFunctionNamesCondition(rdoJitter, "geom_jitter") ucrPnlPlots.AddFunctionNamesCondition(rdoViolin, "geom_violin") - ucrPnlPlots.AddToLinkedControls({ucrChkAddPoints}, {rdoBoxplotTufte, rdoViolin}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlPlots.AddToLinkedControls({ucrChkAddPoints, ucrChkWidth}, {rdoBoxplotTufte, rdoViolin}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlPlots.AddToLinkedControls({ucrChkTufte}, {rdoBoxplotTufte}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkTufte.AddToLinkedControls(ucrChkVarWidth, {"FALSE"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlPlots.AddToLinkedControls(ucrChkBoxPlot, {rdoJitter, rdoViolin}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) @@ -235,7 +235,7 @@ Public Class dlgBoxplot ucrInputStation.SetItems({strFacetWrap, strFacetRow, strFacetCol, strNone}) ucrInputStation.SetDropDownStyleAsNonEditable() - ucrChkWidth.SetText("Cut Width") + ucrChkWidth.SetText("Width") ucrChkWidth.AddToLinkedControls({ucrInputWidth}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.25) ucrChkWidth.AddParameterValuesCondition(True, "cut_width", "True") ucrChkWidth.AddParameterValuesCondition(False, "cut_width", "False") @@ -260,7 +260,6 @@ Public Class dlgBoxplot ucrChkGrouptoConnect.AddParameterPresentCondition(False, strStatSummaryParameterName, False) 'this control exists but diabled for now DialogueSize() - HideShowWidth() End Sub Private Sub SetDefaults() @@ -439,7 +438,6 @@ Public Class dlgBoxplot ucrChkBoxPlot.SetRCode(clsDummyFunction, bReset) ucrChkWidth.SetRCode(clsDummyFunction, bReset) End If - HideShowWidth() End Sub Private Sub TestOkEnabled() @@ -490,8 +488,6 @@ Public Class dlgBoxplot SetGeomPrefixFillColourAes() DialogueSize() EnableDisableBoxplotOptions() - HideShowWidth() - If rdoBoxplotTufte.Checked Then If ucrChkAddPoints.Checked Then clsBoxplotFunction.AddParameter("outlier.shape", "NA", iPosition:=2) @@ -736,7 +732,6 @@ Public Class dlgBoxplot AddRemoveGroupBy() EnableDisableWidth() AddRemoveAesParm() - HideShowWidth() End Sub Private Sub GetParameterValue(clsOperator As ROperator) @@ -810,20 +805,22 @@ Public Class dlgBoxplot clsCutWitdhFunction.RemoveParameterByName("var") End If EnableDisableWidth() - HideShowWidth() End Sub Private Sub ucrChkWidth_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkWidth.ControlValueChanged EnableDisableWidth() - HideShowWidth() End Sub Private Sub EnableDisableWidth() If ucrByFactorsReceiver.strCurrDataType = "Date" OrElse ucrByFactorsReceiver.strCurrDataType = "factor" OrElse ucrByFactorsReceiver.strCurrDataType = "orderded, factor" Then + ucrChkWidth.Enabled = False + ucrInputWidth.Enabled = False clsBoxplotFunction.RemoveParameterByName("aes") clsWidthRaesFunction.RemoveParameterByName("group") clsViolinplotFunction.RemoveParameterByName("aes") Else + ucrChkWidth.Enabled = True + ucrInputWidth.Enabled = True If ucrChkWidth.Checked AndAlso Not ucrByFactorsReceiver.IsEmpty Then clsWidthRaesFunction.AddParameter("group", clsRFunctionParameter:=clsCutWitdhFunction, iPosition:=1) clsBoxplotFunction.AddParameter("aes", clsRFunctionParameter:=clsWidthRaesFunction, bIncludeArgumentName:=False, iPosition:=1) @@ -836,23 +833,6 @@ Public Class dlgBoxplot End If End Sub - Private Sub HideShowWidth() - ucrChkWidth.Visible = False - ucrInputWidth.Visible = False - If rdoBoxplotTufte.Checked OrElse rdoViolin.Checked Then - If ucrByFactorsReceiver.strCurrDataType = "numeric" Then - ucrChkWidth.Visible = True - ucrInputWidth.Visible = ucrChkWidth.Checked - Else - ucrChkWidth.Visible = False - ucrInputWidth.Visible = False - End If - Else - ucrChkWidth.Visible = False - ucrInputWidth.Visible = False - End If - End Sub - Private Sub ucrChkBoxPlot_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkBoxPlot.ControlValueChanged, ucrNudBoxPlot.ControlValueChanged If ucrChkBoxPlot.Checked Then clsGeomBoxPlotFunction.AddParameter("width", ucrNudBoxPlot.GetText(), iPosition:=3)