OSDN Git Service

不要となっていたプロパティを削除
[kcd/KCD.git] / KCD / CalculateConditionPanelController.swift
index e433bc2..261869c 100644 (file)
@@ -8,13 +8,14 @@
 
 import Cocoa
 
-class CalculateConditionPanelController: NSWindowController {
+final class CalculateConditionPanelController: NSWindowController {
     
-    override var windowNibName: String {
-        return String(describing: type(of: self))
+    override var windowNibName: NSNib.Name {
+        
+        return .nibName(instanceOf: self)
     }
     
-    dynamic var condition: Double = 1
+    @objc dynamic var condition: Double = 1
     
     private var originalCondition: Double = 1
     
@@ -37,7 +38,12 @@ class CalculateConditionPanelController: NSWindowController {
     
     func beginModal(for mainWindow: NSWindow, completeHander handler: @escaping (Double) -> Void) {
         
-        guard let window = self.window else { return }
+        guard let window = self.window else {
+            
+            return
+        }
+        
+        originalCondition = condition
         
         mainWindow.beginSheet(window) { _ in