|
@@ -995,35 +995,40 @@ extension KMEditPDFTextPropertyViewController {
|
|
|
self._trackEvent()
|
|
|
}
|
|
|
|
|
|
- @objc func leftAlignmentAction() {
|
|
|
+ @objc func leftAlignmentAction(sender: NSButton?) {
|
|
|
self.leftAlignmentVC?.state = .Sel
|
|
|
self.rightAlignmentVC?.state = .Norm
|
|
|
self.centerAlignmentVC?.state = .Norm
|
|
|
self.updateAlignment(alignment: .left)
|
|
|
-
|
|
|
- KMEditPDFPopToolBarWindow.shared.updateTextAlign(align: .left)
|
|
|
+ if let _ = sender {
|
|
|
+ KMEditPDFPopToolBarWindow.shared.updateTextAlign(align: .left)
|
|
|
+ }
|
|
|
|
|
|
self._trackEvent()
|
|
|
}
|
|
|
|
|
|
- @objc func centerAlignmentAction() {
|
|
|
+ @objc func centerAlignmentAction(sender: NSButton?) {
|
|
|
self.leftAlignmentVC?.state = .Norm
|
|
|
self.rightAlignmentVC?.state = .Norm
|
|
|
self.centerAlignmentVC?.state = .Sel
|
|
|
self.updateAlignment(alignment: .center)
|
|
|
|
|
|
- KMEditPDFPopToolBarWindow.shared.updateTextAlign(align: .center)
|
|
|
+ if let _ = sender {
|
|
|
+ KMEditPDFPopToolBarWindow.shared.updateTextAlign(align: .center)
|
|
|
+ }
|
|
|
|
|
|
self._trackEvent()
|
|
|
}
|
|
|
|
|
|
- @objc func rightAlignmentAction() {
|
|
|
+ @objc func rightAlignmentAction(sender: NSButton?) {
|
|
|
self.leftAlignmentVC?.state = .Norm
|
|
|
self.rightAlignmentVC?.state = .Sel
|
|
|
self.centerAlignmentVC?.state = .Norm
|
|
|
self.updateAlignment(alignment: .right)
|
|
|
|
|
|
- KMEditPDFPopToolBarWindow.shared.updateTextAlign(align: .right)
|
|
|
+ if let _ = sender {
|
|
|
+ KMEditPDFPopToolBarWindow.shared.updateTextAlign(align: .right)
|
|
|
+ }
|
|
|
|
|
|
self._trackEvent()
|
|
|
}
|
|
@@ -1031,13 +1036,13 @@ extension KMEditPDFTextPropertyViewController {
|
|
|
func selectAlignment(alignment: NSTextAlignment) {
|
|
|
switch alignment {
|
|
|
case .left:
|
|
|
- self.leftAlignmentAction()
|
|
|
+ self.leftAlignmentAction(sender: nil)
|
|
|
case .right:
|
|
|
- self.rightAlignmentAction()
|
|
|
+ self.rightAlignmentAction(sender: nil)
|
|
|
case .center:
|
|
|
- self.centerAlignmentAction()
|
|
|
+ self.centerAlignmentAction(sender: nil)
|
|
|
default:
|
|
|
- self.leftAlignmentAction()
|
|
|
+ self.leftAlignmentAction(sender: nil)
|
|
|
}
|
|
|
}
|
|
|
|