Skip to content

Commit

Permalink
Reverted some changes to TouchDrawView
Browse files Browse the repository at this point in the history
  • Loading branch information
dehli committed Mar 27, 2016
1 parent 081a559 commit 9f02622
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions TouchDraw/TouchDrawView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public class TouchDrawView: UIView {

checkClearState()

if undoManager != nil && !undoManager!.canRedo {
if !undoManager!.canRedo {
if redoEnabled {
delegate.redoDisabled()
redoEnabled = false
Expand Down Expand Up @@ -250,7 +250,7 @@ public class TouchDrawView: UIView {

/// if possible, it will undo the last stroke
public func undo() -> Void {
if undoManager != nil && undoManager!.canUndo {
if undoManager!.canUndo {
undoManager?.undo()

if !redoEnabled {
Expand All @@ -271,7 +271,7 @@ public class TouchDrawView: UIView {

/// if possible, it will redo the last undone stroke
public func redo() -> Void {
if undoManager != nil && undoManager!.canRedo {
if undoManager!.canRedo {
undoManager?.redo()

if !undoEnabled {
Expand Down

0 comments on commit 9f02622

Please sign in to comment.