mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 22:58:58 +08:00
Merge branch 'Ip_adress_dialog' of github.com:Ultimaker/Cura into replace_controls_1_for_controls_2
This commit is contained in:
commit
266214d651
@ -333,18 +333,16 @@ Cura.MachineAction
|
||||
}
|
||||
}
|
||||
|
||||
onRejected:
|
||||
{
|
||||
manualPrinterDialog.reject()
|
||||
manualPrinterDialog.hide()
|
||||
}
|
||||
onAccepted:
|
||||
{
|
||||
// Validate the input first
|
||||
if (!networkingUtil.isValidIP(manualPrinterDialog.addressText))
|
||||
{
|
||||
invalidIPAddressMessageDialog.open()
|
||||
return
|
||||
// prefent closing of element, as we want to keep the dialog active after a wrongly entered IP adress
|
||||
manualPrinterDialog.open()
|
||||
// show invalid ip warning
|
||||
invalidIPAddressMessageDialog.open();
|
||||
return;
|
||||
}
|
||||
|
||||
// if the entered IP address has already been discovered, switch the current item to that item
|
||||
@ -354,14 +352,12 @@ Cura.MachineAction
|
||||
var device = manager.foundDevices[i]
|
||||
if (device.address == manualPrinterDialog.addressText)
|
||||
{
|
||||
currentItemIndex = i
|
||||
manualPrinterDialog.hide()
|
||||
return
|
||||
currentItemIndex = i;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
manager.setManualDevice(manualPrinterDialog.printerKey, manualPrinterDialog.addressText)
|
||||
manualPrinterDialog.hide()
|
||||
manager.setManualDevice(manualPrinterDialog.printerKey, manualPrinterDialog.addressText);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user