------------------------------------------------------------------------------
| 73 | |
| 74 | //------------------------------------------------------------------------------ |
| 75 | void vtkSliderRepresentation::SetMaximumValue(double maxValue) |
| 76 | { |
| 77 | if (maxValue == this->MaximumValue) |
| 78 | { |
| 79 | return; |
| 80 | } |
| 81 | |
| 82 | if (maxValue <= this->MinimumValue) |
| 83 | { |
| 84 | this->MinimumValue = maxValue - 1; |
| 85 | } |
| 86 | |
| 87 | this->MaximumValue = maxValue; |
| 88 | |
| 89 | if (this->Value < this->MinimumValue) |
| 90 | { |
| 91 | this->Value = this->MinimumValue; |
| 92 | } |
| 93 | else if (this->Value > this->MaximumValue) |
| 94 | { |
| 95 | this->Value = this->MaximumValue; |
| 96 | } |
| 97 | this->CurrentT = (this->Value - this->MinimumValue) / (this->MaximumValue - this->MinimumValue); |
| 98 | |
| 99 | this->Modified(); |
| 100 | this->InvokeEvent(vtkCommand::WidgetValueChangedEvent, nullptr); |
| 101 | this->BuildRepresentation(); |
| 102 | } |
| 103 | |
| 104 | //------------------------------------------------------------------------------ |
| 105 | void vtkSliderRepresentation::SetValue(double value) |