fix filter dialog
This commit is contained in:
@@ -131,7 +131,11 @@ public class FilterController {
|
||||
return showDialog(parent, content, new MarketFilter());
|
||||
}
|
||||
|
||||
public Optional<MarketFilter> showDialog(Parent parent, Parent content, MarketFilter filter){
|
||||
public boolean showEditDialog(Parent parent, Parent content, MarketFilter filter){
|
||||
return showDialog(parent, content, filter).isPresent();
|
||||
}
|
||||
|
||||
private Optional<MarketFilter> showDialog(Parent parent, Parent content, MarketFilter filter){
|
||||
if (dlg == null){
|
||||
createDialog(parent, content);
|
||||
}
|
||||
@@ -164,7 +168,4 @@ public class FilterController {
|
||||
excludes.getItems().clear();
|
||||
}
|
||||
|
||||
public MarketFilter getFilter(){
|
||||
return filter;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,12 +258,9 @@ public class MainController {
|
||||
}
|
||||
|
||||
public void editFilter(){
|
||||
/*TODO: implement
|
||||
Optional<MarketFilter> res = Screeners.showFilter(market.getAnalyzer().getFilter());
|
||||
if (res.isPresent()){
|
||||
Main.SETTINGS.setFilter(res.get());
|
||||
if (Screeners.showFilter(market.getAnalyzer().getFilter())){
|
||||
Main.SETTINGS.setFilter(market.getAnalyzer().getFilter());
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
public void impMadSystems(ActionEvent actionEvent) {
|
||||
|
||||
@@ -224,8 +224,8 @@ public class Screeners {
|
||||
return filterController.showDialog(mainScreen, filterScreen);
|
||||
}
|
||||
|
||||
public static Optional<MarketFilter> showFilter(MarketFilter filter) {
|
||||
return filterController.showDialog(mainScreen, filterScreen, filter);
|
||||
public static boolean showFilter(MarketFilter filter) {
|
||||
return filterController.showEditDialog(mainScreen, filterScreen, filter);
|
||||
}
|
||||
|
||||
public static Optional<Pair<String, String>> showLogin() {
|
||||
|
||||
Reference in New Issue
Block a user