1066: Grouping by Camera Make/Model depends on data source selection, despite being told otherwise

This commit is contained in:
Raman 2018-10-11 13:22:01 -04:00
parent 09def81220
commit aee36df5ea
2 changed files with 4 additions and 1 deletions

View File

@ -449,7 +449,7 @@ public class GroupManager {
*
* @param dataSource Data source to display or null to display all of them
*/
synchronized void setDataSource(DataSource dataSource) {
public synchronized void setDataSource(DataSource dataSource) {
dataSourceProp.set(dataSource);
}

View File

@ -185,6 +185,9 @@ public class Toolbar extends ToolBar {
alert.initOwner(getScene().getWindow());
GuiUtils.setDialogIcons(alert);
if (alert.showAndWait().orElse(ButtonType.CANCEL) == ButtonType.OK) {
// Set the datasource selection to 'All', before switching group
controller.getGroupManager().setDataSource(null);
queryInvalidationListener.invalidated(observable);
} else {
Platform.runLater(() -> groupByBox.getSelectionModel().select(DrawableAttribute.PATH));