mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-29 23:38:11 +08:00
Fix crash from overflowing values given to NumberInput widgets (#1377)
* Added hints for brush tool size * Added hints for brush tool size * Solved the user being able to crash the editor by overflowing NumberInputs
This commit is contained in:
committed by
Keavon Chambers
parent
1c11ebcc4e
commit
fd338c945f
@@ -94,6 +94,7 @@ impl LayoutHolder for ExportDialogMessageHandler {
|
||||
NumberInput::new(Some(self.scale_factor))
|
||||
.unit(" ")
|
||||
.min(0.)
|
||||
.max((1u64 << std::f64::MANTISSA_DIGITS) as f64)
|
||||
.disabled(self.file_type == FileType::Svg)
|
||||
.on_update(|number_input: &NumberInput| ExportDialogMessage::ScaleFactor(number_input.value.unwrap()).into())
|
||||
.widget_holder(),
|
||||
|
||||
Reference in New Issue
Block a user