Skip to content

Commit

Permalink
Merge pull request #235 from girder/cancel-multi-select
Browse files Browse the repository at this point in the history
Better handle canceling a multi-file select
  • Loading branch information
manthey authored May 30, 2024
2 parents 852f877 + fb0c429 commit edb54e1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion slicer_cli_web/web_client/views/ControlWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,16 +380,24 @@ const ControlWidget = View.extend({
completeInitialization(settings) {
const modal = new ItemSelectorWidget(settings);
modal.once('g:saved', () => {
this.model.unset('revertType');
modal.$el.modal('hide');
}).render();
modal.$el.on('hidden.bs.modal', () => {
if (this.model.get('revertType')) {
this.model.set('type', this.model.get('revertType'));
this.model.unset('revertType');
}
});
},
_selectMultiFile() {
// Store the current type in case it is opened again
const t = this.model.get('type');
if (t !== 'multi') {
this.model.set({
type: 'multi',
defaultType: t
defaultType: t,
revertType: t
});
}

Expand Down

0 comments on commit edb54e1

Please sign in to comment.