Skip to content

Commit

Permalink
Just the settings
Browse files Browse the repository at this point in the history
  • Loading branch information
jdhoek committed May 5, 2020
1 parent fa57d66 commit 2d252de
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 180 deletions.
25 changes: 12 additions & 13 deletions src/nl/jeroenhoek/josm/gridify/GridifyAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import nl.jeroenhoek.josm.gridify.exception.GridifyException;
import nl.jeroenhoek.josm.gridify.exception.UserInputException;
import nl.jeroenhoek.josm.gridify.exception.UserCancelledException;
import nl.jeroenhoek.josm.gridify.ui.GridifySettingsDialog;
import org.openstreetmap.josm.actions.JosmAction;
import org.openstreetmap.josm.command.AddCommand;
import org.openstreetmap.josm.command.ChangePropertyCommand;
Expand Down Expand Up @@ -103,23 +102,23 @@ Collection<Command> performGridifyAction(DataSet dataSet) throws GridifyExceptio

GridifySettings settings = new GridifySettings();

GridifySettingsDialog dialog = new GridifySettingsDialog(inputData, settings);
dialog.showDialog();

// Only the OK button returns 1, the rest means 'Cancel' or a closed dialog window.
if (dialog.getValue() != 1) {
throw new UserCancelledException();
}
// GridifySettingsDialog dialog = new GridifySettingsDialog(inputData, settings);
// dialog.showDialog();
//
// // Only the OK button returns 1, the rest means 'Cancel' or a closed dialog window.
// if (dialog.getValue() != 1) {
// throw new UserCancelledException();
// }

GridExtrema extrema = inputData.getGridExtrema();
Collection<Command> commands = new ArrayList<>();

// Read the user provided settings.
int numRows = dialog.getRowCount();
int numColumns = dialog.getColumnCount();
Operation operation = dialog.getOperation();
boolean deleteSourceWay = dialog.deleteSourceWay();
boolean copyTags = dialog.copyTags();
int numRows = settings.getNumRows();
int numColumns = settings.getNumColumns();
Operation operation = settings.getOperation();
boolean deleteSourceWay = settings.deleteSource();
boolean copyTags = settings.copyTagsFromSource();

// Update settings properties now that we are about to commence the operation.
// This way the user gets to keep the last settings they entered.
Expand Down
167 changes: 0 additions & 167 deletions src/nl/jeroenhoek/josm/gridify/ui/GridifySettingsDialog.java

This file was deleted.

0 comments on commit 2d252de

Please sign in to comment.