mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-22 05:37:55 +01:00
Unable to close add printer popup when no printer is added
This commit is contained in:
parent
78764383e1
commit
34147a918e
@ -458,7 +458,7 @@ class Settings extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
</Tab>
|
</Tab>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
{printDialog(this.props, this.state, 'Add Printer', 'addPrinter', 'Add', addPrinter, this.closeAddPrinterDialog, null, this.addPrinter)}
|
{printDialog(this.props, this.state, 'Add Printer', 'addPrinter', 'Add', addPrinter, localStorage.active && this.closeAddPrinterDialog, null, this.addPrinter)}
|
||||||
{printDialog(this.props, this.state, 'Manage Printer', 'managePrinter', 'Save', managePrinter, this.closeManagePrinterDialog, this.removeActivePrinter, this.editPrinter)}
|
{printDialog(this.props, this.state, 'Manage Printer', 'managePrinter', 'Save', managePrinter, this.closeManagePrinterDialog, this.removeActivePrinter, this.editPrinter)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@ -473,11 +473,11 @@ function printDialog(props, state, title, form, submitText, data, closeDialog, r
|
|||||||
<Dialog
|
<Dialog
|
||||||
title={title}
|
title={title}
|
||||||
open={data.open}
|
open={data.open}
|
||||||
onRequestClose={closeDialog}
|
onRequestClose={closeDialog ? closeDialog : null}
|
||||||
contentStyle={{ maxWidth: '400px' }}
|
contentStyle={{ maxWidth: '400px' }}
|
||||||
autoScrollBodyContent
|
autoScrollBodyContent
|
||||||
actions={[
|
actions={[
|
||||||
<FlatButton
|
closeDialog && <FlatButton
|
||||||
label="Cancel"
|
label="Cancel"
|
||||||
onTouchTap={closeDialog}
|
onTouchTap={closeDialog}
|
||||||
/>,
|
/>,
|
||||||
|
Loading…
Reference in New Issue
Block a user