OSDN Git Service

処理を簡素化
authormasakih <masakih@users.sourceforge.jp>
Tue, 12 Dec 2017 15:46:27 +0000 (00:46 +0900)
committermasakih <masakih@users.sourceforge.jp>
Tue, 12 Dec 2017 15:46:27 +0000 (00:46 +0900)
KCD/ScreenshotListWindowController.swift

index d68e46c..b1a88db 100644 (file)
@@ -177,13 +177,13 @@ extension ScreenshotListWindowController: NSSplitViewDelegate {
         let leftView = splitView.subviews[0]
         let rightView = splitView.subviews[1]
         
-        if leftView == view {
+        if leftView == view, leftView.frame.width < ScreenshotListWindowController.leftMinWidth {
             
-            if leftView.frame.width < ScreenshotListWindowController.leftMinWidth { return false }
+            return false
         }
-        if rightView == view {
+        if rightView == view, leftView.frame.width >= ScreenshotListWindowController.leftMinWidth {
             
-            if leftView.frame.width >= ScreenshotListWindowController.leftMinWidth { return false }
+            return false
         }
         
         return true