Просмотр исходного кода

Make shortcut property drill in behavior match the main properties section.

Ryan Olson лет назад: 12
Родитель
Сommit
947d4c83fe
1 измененных файлов с 6 добавлено и 1 удалено
  1. 6 1
      Classes/Object Explorers/FLEXViewExplorerViewController.m

+ 6 - 1
Classes/Object Explorers/FLEXViewExplorerViewController.m

@@ -145,7 +145,12 @@ typedef NS_ENUM(NSUInteger, FLEXViewExplorerRow) {
     } else if ([rowCookie isKindOfClass:[NSString class]]) {
     } else if ([rowCookie isKindOfClass:[NSString class]]) {
         objc_property_t property = [self viewPropertyForName:rowCookie];
         objc_property_t property = [self viewPropertyForName:rowCookie];
         if (property) {
         if (property) {
-            drillInViewController = [[FLEXPropertyEditorViewController alloc] initWithTarget:self.viewToExplore property:property];
+            id currentValue = [FLEXRuntimeUtility valueForProperty:property onObject:self.viewToExplore];
+            if ([FLEXPropertyEditorViewController canEditProperty:property currentValue:currentValue]) {
+                drillInViewController = [[FLEXPropertyEditorViewController alloc] initWithTarget:self.object property:property];
+            } else {
+                drillInViewController = [FLEXObjectExplorerFactory explorerViewControllerForObject:currentValue];
+            }
         }
         }
     }
     }