mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 14:34:01 -06: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
1 changed files with 8 additions and 12 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue