mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 11:25:57 +03:00
Fix crash on Mac with Touch Bar
This commit is contained in:
parent
ac1c100352
commit
ee47729990
@ -2,6 +2,15 @@
|
||||
Change Log
|
||||
==========================
|
||||
|
||||
3.1.7 (188)
|
||||
--------------------------
|
||||
|
||||
### Fixes
|
||||
|
||||
- Fix an issue on MacBook Pro with Touch Bar where the application crashed immediately after launch.
|
||||
|
||||
|
||||
|
||||
3.1.6 (186)
|
||||
--------------------------
|
||||
|
||||
|
@ -22,6 +22,23 @@
|
||||
<h1>Release Notes</h1>
|
||||
|
||||
|
||||
<article>
|
||||
<header>
|
||||
<h1>CotEditor 3.1.7</h1>
|
||||
<p>release: <time>2016-03-03</time></p>
|
||||
</header>
|
||||
|
||||
|
||||
<section>
|
||||
<h3>Fixes</h3>
|
||||
|
||||
<ul>
|
||||
<li>Fix an issue on MacBook Pro with Touch Bar where the application crashed immediately after launch.</li>
|
||||
</ul>
|
||||
</section>
|
||||
</article>
|
||||
|
||||
|
||||
<article>
|
||||
<header>
|
||||
<h1>CotEditor 3.1.6</h1>
|
||||
|
@ -22,6 +22,23 @@
|
||||
<h1>リリースノート</h1>
|
||||
|
||||
|
||||
<article>
|
||||
<header>
|
||||
<h1>CotEditor 3.1.7</h1>
|
||||
<p>リリース: <time>2016-03-03</time></p>
|
||||
</header>
|
||||
|
||||
|
||||
<section>
|
||||
<h3>Fixes</h3>
|
||||
|
||||
<ul>
|
||||
<li>Touch Bar の付いた MacBook Pro で起動直後にアプリケーションがクラッシュする不具合を修正しました。</li>
|
||||
</ul>
|
||||
</section>
|
||||
</article>
|
||||
|
||||
|
||||
<article>
|
||||
<header>
|
||||
<h1>CotEditor 3.1.6</h1>
|
||||
|
@ -218,14 +218,11 @@ extension NSCustomTouchBarItem: NSValidatedUserInterfaceItem {
|
||||
let validator = NSApp.target(forAction: action, to: control.target, from: self)
|
||||
else { return }
|
||||
|
||||
switch validator {
|
||||
case let validator as TouchBarItemValidations:
|
||||
// ! DO NOT use `swich ... case let` to classify. It causes crash.
|
||||
if let validator = validator as? TouchBarItemValidations {
|
||||
control.isEnabled = validator.validateTouchBarItem(self)
|
||||
|
||||
case let validator as NSUserInterfaceValidations:
|
||||
control.isEnabled = validator.validateUserInterfaceItem(self)
|
||||
|
||||
default: break
|
||||
} else if let validator = validator as? NSUserInterfaceValidations {
|
||||
control.isEnabled = (validator as AnyObject).validateUserInterfaceItem(self)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user