~canonical-dx-team/nux/nux.fix-702538

« back to all changes in this revision

Viewing changes to Nux/SpinBox.cpp

  • Committer: Jay Taoko
  • Date: 2011-01-04 03:57:29 UTC
  • mfrom: (157.1.13 nux-holidays)
  • Revision ID: jay.taoko@canonical.com-20110104035729-0xh3iabo7e7dk371
* Added support to copy a texture from the current render target
* Blur, Color matrix, Exponent shaders
* Gaussian blur
* Bug fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
152
152
 
153
153
  void SpinBox::SetValue (int value)
154
154
  {
155
 
    m_iValue = m_IntValidator.Validate (value);
 
155
    m_iValue = m_IntValidator.GetClampedValue (value);
156
156
    m_EditLine->SetText (NString::Printf ("%d", m_iValue) );
157
157
    sigValueChanged.emit (this);
158
158
    sigValue.emit (m_iValue);
193
193
  {
194
194
    m_IntValidator.SetMinimum (MinValue);
195
195
    m_IntValidator.SetMaximum (Maxvalue);
196
 
    m_iValue = m_IntValidator.Validate (m_iValue);
 
196
    m_iValue = m_IntValidator.GetClampedValue (m_iValue);
197
197
    sigValueChanged.emit (this);
198
198
    sigValue.emit (m_iValue);
199
199
    NeedRedraw();
242
242
    double ret = 0;
243
243
    ret = CharToDouble (m_EditLine->GetCleanText().GetTCharPtr() );
244
244
    {
245
 
      m_iValue = m_IntValidator.Validate (ret);
 
245
      m_iValue = m_IntValidator.GetClampedValue (ret);
246
246
      m_EditLine->SetText (NString::Printf ("%d", m_iValue) );
247
247
      sigValueChanged.emit (this);
248
248
      sigValue.emit (m_iValue);