mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 21:44:01 -06:00
Change camera URL to non-optional QUrl
Otherwise pyqt property will complain when it tries to convert a None to a QUrl.
This commit is contained in:
parent
0c1b3931db
commit
02681a5700
5 changed files with 23 additions and 30 deletions
|
@ -8,7 +8,7 @@ import UM 1.3 as UM
|
|||
import Cura 1.0 as Cura
|
||||
|
||||
Item {
|
||||
property var cameraUrl: null;
|
||||
property var cameraUrl: "";
|
||||
|
||||
Rectangle {
|
||||
anchors.fill:parent;
|
||||
|
@ -18,7 +18,7 @@ Item {
|
|||
|
||||
MouseArea {
|
||||
anchors.fill: parent;
|
||||
onClicked: OutputDevice.setActiveCameraUrl(null);
|
||||
onClicked: OutputDevice.setActiveCameraUrl("");
|
||||
z: 0;
|
||||
}
|
||||
|
||||
|
@ -41,11 +41,11 @@ Item {
|
|||
height: Math.round((imageHeight === 0 ? 600 * screenScaleFactor : imageHeight) * width / imageWidth);
|
||||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
if (cameraUrl != null) {
|
||||
if (cameraUrl != "") {
|
||||
start();
|
||||
}
|
||||
} else {
|
||||
if (cameraUrl != null) {
|
||||
if (cameraUrl != "") {
|
||||
stop();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ Item {
|
|||
MouseArea {
|
||||
anchors.fill: cameraImage;
|
||||
onClicked: {
|
||||
OutputDevice.setActiveCameraUrl(null);
|
||||
OutputDevice.setActiveCameraUrl("");
|
||||
}
|
||||
z: 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue