[Libreoffice-commits] core.git: Branch 'feature/tiledrendering' - ios/shared

Ptyl Dragon ptyl at cloudon.com
Fri Nov 1 12:10:02 CET 2013


 ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 2902b39b3e349f26c04fc93acd37b7db813b1e55
Author: Ptyl Dragon <ptyl at cloudon.com>
Date:   Fri Nov 1 13:09:28 2013 +0200

    UISteppers now go down as well
    
    Change-Id: I06e1b7fec490ec373a9775915d6dc2c30ce805f1

diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
index 22d98fa..1107eef 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
@@ -48,7 +48,7 @@ static const CGFloat DEFAULT_STEP_VALUE = 1;
     stepper.autorepeat = YES;
     stepper.continuous = NO;
     [stepper addObserver:self forKeyPath:@"value"
-                          options: NSKeyValueObservingOptionNew
+                          options: NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld
                           context:0];
     return stepper;
 }
@@ -57,8 +57,10 @@ static const CGFloat DEFAULT_STEP_VALUE = 1;
 {
 
     if (object == self.dataStepper) {
-         NSNumber * floatNumber = change[NSKeyValueChangeNewKey];
-        CGFloat value = [self currentDataValue] + [floatNumber floatValue];
+        NSNumber * newNumber = change[NSKeyValueChangeNewKey];
+        NSNumber * oldNumber = change[NSKeyValueChangeOldKey];
+
+        CGFloat value = [self currentDataValue] + [newNumber floatValue] - [oldNumber floatValue];
 
         if(value == ((NSInteger) value)){
             self.data.text = [[NSNumber numberWithInteger:(NSInteger) value] stringValue];


More information about the Libreoffice-commits mailing list