
package smart_gs.swingui.toolbar.action;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import smart_gs.drawing_tool.drawing_mode.LineSegEditorSelectMode;
import smart_gs.smleditor.swingui.LineSegEditor;

public class LineSegEditorTiltImagePanelUnTiltActionListener implements ActionListener {
	LineSegEditor editor;
	
	public LineSegEditorTiltImagePanelUnTiltActionListener(LineSegEditor editor) {
		this.editor = editor;
	}

	@Override
	public void actionPerformed(ActionEvent arg0) {
		LineSegEditorTiltImagePanel tiltpanel = editor.getTiltPanel();
		editor.pushUndoStack();
		tiltpanel.setDegree(0.0d);
		this.editor.tilt();
		this.editor.setMode(new LineSegEditorSelectMode(this.editor));
	}

}
