Skip to content

Commit

Permalink
Fix 3mf export flow through material dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
ochafik committed Dec 31, 2024
1 parent e087b87 commit 5617355
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/ExportButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default function ExportButton({className, style}: {className?: string, st
{
data: '3mf',
buttonLabel: 'Download 3MF',
label: '3MF (3D Manufacturing Format)',
label: '3MF (Multimaterial)',
icon: 'pi pi-file',
command: () => model!.setFormats(undefined, '3mf'),
},
Expand Down
3 changes: 2 additions & 1 deletion src/components/MultimaterialColorsDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,12 @@ export default function MultimaterialColorsDialog() {
disabled={!tempExtruderColors.every(c => chroma.valid(c) || c.trim() === '')}
autoFocus
onClick={e => {
const wasExporting = state.view.extruderPickerVisibility === 'exporting';
model!.mutate(s => {
s.params.extruderColors = tempExtruderColors.filter(c => c.trim() !== '');
s.view.extruderPickerVisibility = undefined;
});
if (state.view.extruderPickerVisibility === 'exporting') {
if (wasExporting) {
model!.export();
}
}} />
Expand Down

0 comments on commit 5617355

Please sign in to comment.