Browse Source

macosx: do not assign intValue to prevent formatting issues

This is a temporary solution for #22576

It results in numbers not having thousands separator anymore, which
is better than the user being unable to save the desired value.
cherry-pick-c5513cf9
Marvin Scholz 3 years ago
parent
commit
a10dfa55be
  1. 10
      modules/gui/macosx/prefs_widgets.m

10
modules/gui/macosx/prefs_widgets.m

@ -1352,7 +1352,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \
ADD_TEXTFIELD(o_textfield, mainFrame, mainFrame.size.width - 19 - 52,
1, 49, toolTip, @"")
[o_textfield setIntValue: p_item->value.i];
[o_textfield setStringValue: @(p_item->value.i).stringValue];
[o_textfield setDelegate: self];
[[NSNotificationCenter defaultCenter] addObserver: self
selector: @selector(textfieldChanged:)
@ -1382,12 +1382,12 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \
- (IBAction)stepperChanged:(id)sender
{
[o_textfield setIntValue: [o_stepper intValue]];
[o_textfield takeStringValueFrom:sender];
}
- (void)textfieldChanged:(NSNotification *)o_notification
{
[o_stepper setIntValue: [o_textfield intValue]];
[o_stepper takeStringValueFrom:o_textfield];
}
- (int)intValue
@ -1583,12 +1583,12 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \
- (IBAction)sliderChanged:(id)sender
{
[o_textfield setIntValue: [o_slider intValue]];
[o_textfield takeStringValueFrom:o_slider];
}
- (void)textfieldChanged:(NSNotification *)o_notification
{
[o_slider setIntValue: [o_textfield intValue]];
[o_slider takeStringValueFrom:o_textfield];
}
- (int)intValue

Loading…
Cancel
Save