Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Processing / measuring tool bug fix #5736

Merged
merged 3 commits into from
Oct 19, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 42 additions & 4 deletions src/qml/qgismobileapp.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2139,6 +2139,12 @@ ApplicationWindow {
homeButton.waitingForDigitizingFinish = false;
}

function activateMeasurementMode() {
mainMenu.close();
dashBoard.close();
changeMode('measure');
}

Menu {
id: mainMenu
title: qsTr("Main Menu")
Expand Down Expand Up @@ -2194,6 +2200,7 @@ ApplicationWindow {
}

QfToolButton {
id: measurementButton
anchors.verticalCenter: parent.verticalCenter
height: 48
width: 48
Expand All @@ -2203,10 +2210,12 @@ ApplicationWindow {
bgcolor: hovered ? parent.hoveredColor : "#00ffffff"

onClicked: {
mainMenu.close();
dashBoard.close();
changeMode('measure');
highlighted = false;
if (featureForm.state === "ProcessingAlgorithmForm") {
cancelAlgorithmDialog.visible = true;
} else {
activateMeasurementMode();
highlighted = false;
}
}
}

Expand Down Expand Up @@ -4033,6 +4042,35 @@ ApplicationWindow {
standardButtons: Dialog.Yes | Dialog.No
}

Dialog {
id: cancelAlgorithmDialog
parent: mainWindow.contentItem

visible: false
modal: true
font: Theme.defaultFont

z: 10000 // 1000s are embedded feature forms, user a higher value to insure the dialog will always show above embedded feature forms
x: (mainWindow.width - width) / 2
y: (mainWindow.height - height) / 2

title: qsTr("Cancel algorithm")
nirvn marked this conversation as resolved.
Show resolved Hide resolved
Label {
width: parent.width
wrapMode: Text.WordWrap
text: qsTr("You are about to dismiss algorithm, proceed?")
nirvn marked this conversation as resolved.
Show resolved Hide resolved
}

standardButtons: Dialog.Ok | Dialog.Cancel
onAccepted: {
featureForm.state = "Hidden";
activateMeasurementMode();
}
onDiscarded: {
cancelAlgorithmDialog.visible = false;
}
}

Connections {
target: pluginManager

Expand Down
Loading