Explorar o código

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

Ryan Olson %!s(int64=12) %!d(string=hai) anos
pai
achega
947d4c83fe
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  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]]) {
         objc_property_t property = [self viewPropertyForName:rowCookie];
         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];
+            }
         }
     }