소스 검색

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

Ryan Olson 12 년 전
부모
커밋
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]]) {
         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];
+            }
         }
     }