Skip to content

Commit

Permalink
fix display of the current spec constraints in CVWidgetEditor: added …
Browse files Browse the repository at this point in the history
…another instance-var 'specConstraintsText' that can be considered when updating cvSpec.model

Signed-off-by: nuss <st9fan@gmail.com>
  • Loading branch information
nuss committed Mar 7, 2013
1 parent f33b1f4 commit bc74c0a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
14 changes: 11 additions & 3 deletions CVCenter/CVWidget.sc
Expand Up @@ -973,7 +973,7 @@ CVWidget {
thisGuiEnv.editor.specsListSpecs.array_([theChanger.value]++thisGuiEnv.editor.specsListSpecs.array);
thisGuiEnv.editor.specsList.value_(0);
thisGuiEnv.editor.specsList.refresh;
})
});
});

argWidgetCV.spec_(theChanger.value);
Expand All @@ -988,11 +988,19 @@ CVWidget {
)
});

if(thisGuiEnv.editor.notNil and:{
thisGuiEnv.editor.isClosed.not
}, {
thisGuiEnv.editor.specConstraintsText.string_(
" current widget-spec constraints lo / hi:"+this.getSpec(slot).minval+"/"+this.getSpec(slot).maxval
);
});

if(this.class === CVWidgetKnob, {
if(argWidgetCV.spec.excludingZeroCrossing, {
thisGuiEnv.knob.centered_(true);
}, {
thisGuiEnv.knob.centered_(false);
}, {
thisGuiEnv.knob.centered_(false);
})
})
})
Expand Down
4 changes: 2 additions & 2 deletions CVCenter/CVWidgetEditor.sc
Expand Up @@ -26,7 +26,7 @@ CVWidgetEditor {
var deviceListMenu, cmdListMenu, addDeviceBut, thisCmdNames;
var <ipField, <portField, <nameField, <indexField;
var inputConstraintLoField, inputConstraintHiField, <alwaysPosField;
var <mappingSelect;
var <mappingSelect, <specConstraintsText;
var <connectorBut;
var actionName, enterAction, enterActionBut, <actionsList;
var name, editorSlot;
Expand Down Expand Up @@ -648,7 +648,7 @@ CVWidgetEditor {

flow2.shift(0, 0);

StaticText(thisEditor[\tabs].views[2], flow2.bounds.width-15@15)
specConstraintsText = StaticText(thisEditor[\tabs].views[2], flow2.bounds.width-15@15)
.font_(staticTextFont)
.background_(Color.white)
.string_(" current widget-spec constraints lo / hi:"+widget.getSpec(slot).minval+"/"+widget.getSpec(slot).maxval)
Expand Down

0 comments on commit bc74c0a

Please sign in to comment.