Skip to content

Commit

Permalink
subscribe to upload knockout instead of filepath to resolve issues wi…
Browse files Browse the repository at this point in the history
…th overwriting selected file with new upload, #43
  • Loading branch information
jneilliii committed Apr 17, 2021
1 parent 3666e3e commit 02ca071
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ $(function() {
}
});

self.printerStateViewModel.filepath.subscribe(function(data){
self.printerStateViewModel.dateString.subscribe(function(data){
if(data){
OctoPrint.files.get('local',data)
OctoPrint.files.get('local',self.printerStateViewModel.filepath())
.done(function(file_data){
if(file_data){
if(self.settingsViewModel.settings.plugins.prusaslicerthumbnails.state_panel_thumbnail() && file_data.thumbnail && file_data.thumbnail_src == 'prusaslicerthumbnails'){
Expand All @@ -164,7 +164,9 @@ $(function() {
$('#prusaslicer_state_thumbnail').remove();
}
});
}
} else {
$('#prusaslicer_state_thumbnail').remove();
}
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
plugin_name = "PrusaSlicer Thumbnails"

# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
plugin_version = "0.1.5rc6"
plugin_version = "0.1.5rc7"

# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
# module
Expand Down

0 comments on commit 02ca071

Please sign in to comment.