Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions app/attributes/attributecontroller.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ class AttributeController : public QObject
*/
Q_PROPERTY( FeatureLayerPair featureLayerPair READ featureLayerPair WRITE setFeatureLayerPair NOTIFY featureLayerPairChanged )

//! Returns TRUE if the feature has not been saved yet (has a new/null feature id)
Q_PROPERTY( bool isNewFeature READ isNewFeature NOTIFY featureLayerPairChanged )

// this is never nullptr (a form with no tabs will be parsed as having a single tab)
Q_PROPERTY( AttributeTabProxyModel *attributeTabProxyModel READ attributeTabProxyModel NOTIFY attributeTabProxyModelChanged )

Expand Down
3 changes: 3 additions & 0 deletions app/qml/dialogs/MMRemovePhotoDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ MMDrawerDialog {
signal unlinkImage()

property string imagePath
property string featureState: ""

imageSource: __style.negativeMMSymbolImage
title: qsTr( "Delete photo?" )
Expand All @@ -35,6 +36,8 @@ MMDrawerDialog {
secondaryButton {
text: qsTr( "Unlink photo" )

visible: root.featureState !== "add"

fontColor: __style.grapeColor
fontColorHover: __style.negativeColor
}
Expand Down
1 change: 1 addition & 0 deletions app/qml/form/editors/MMFormPhotoEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ MMFormPhotoViewer {
id: imageDeleteDialog

property string imagePath
featureState: root._fieldController.isNewFeature ? "add" : ""

onDeleteImage: {
// schedule the image for deletion
Expand Down
Loading