Skip to content

Commit

Permalink
Block UI when applying rendering settings from right-click menu
Browse files Browse the repository at this point in the history
  • Loading branch information
knabar committed Mar 21, 2024
1 parent fb165ae commit 12b056b
Showing 1 changed file with 17 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1152,17 +1152,23 @@ OME.applyRenderingSettings = function(rdef_url, selected) {
function() {
var clicked_button_text = rdef_confirm_dialog.data("clicked_button");
if (clicked_button_text === "OK") {
$.ajax({
type: "POST",
dataType: 'text',
traditional: true,
url: rdef_url,
data: data,
success: function(data){
// update thumbnails
OME.refreshThumbnails();
}
});
OME.progress_overlay(
new Promise((resolve) => {
$.ajax({
type: "POST",
dataType: 'text',
traditional: true,
url: rdef_url,
data: data,
success: function(data){
// update thumbnails
OME.refreshThumbnails().finally(() => resolve());
},
error: resolve,
});
}),
'Applying rendering settings...'
);
}
},
"Change Rendering Settings?",
Expand Down

0 comments on commit 12b056b

Please sign in to comment.