@@ -825,6 +825,7 @@ on revCalculateGeometryDistances pWhichNumber
825825 if lOrigWidth is empty then put the width of this stack into lOrigWidth
826826 if lOrigHeight is empty then put the height of this stack into lOrigHeight
827827 repeat for each item tEdge in "left,right,top,bottom"
828+ if revGetGeometry("scale" & tEdge ) is not true then next repeat
828829 if revGetGeometry("scale" & tEdge & "Absolute" ) is false then
829830 -- we need to calculate the distance as it stands as a percentage of card width or height
830831 get revCalculateScaleDistance(tEdge )
@@ -844,6 +845,7 @@ on revCalculateGeometryDistances pWhichNumber
844845 end if
845846 end repeat
846847 repeat for each item tDimension in "h,v"
848+ if revGetGeometry("move" & tDimension ) is not true then next repeat
847849 if revGetGeometry("move" & tDimension & "Absolute" ) is false then
848850 -- we need to calculate the distance as it stands as a percentage of card width or height
849851 get revCalculateMoveDistance(tDimension )
@@ -1101,3 +1103,40 @@ function revUniqueIDToName pWhich
11011103 end if
11021104 end repeat
11031105end revUniqueIDToName
1106+
1107+ # Clears any extra keys from the current profile's geometry settings. If no settings
1108+ # are found, removes the key for the profile.
1109+ command revClearExtraGeometrySettings
1110+ local tProfileName
1111+ put the cREVGeneral["profile" ] of lGeometryObject into tProfileName
1112+ if tProfileName is empty or tProfileName is the cREVGeneral["masterName" ] of lGeometryObject \
1113+ then put "Master" into tProfileName
1114+
1115+ local tGeometry , tKeys , tSettingsUsed
1116+ put the customProperties["cRevGeometry" ] of lGeometryObject into tGeometry
1117+ put the keys of tGeometry into tKeys
1118+ put 0 into tSettingsUsed
1119+
1120+ local tExtraKeys
1121+ repeat for each item tSetting in "moveH,moveV,scaleLeft,scaleRight,scaleTop,scaleBottom"
1122+ -- check to see if each geometry setting is used
1123+ if tGeometry [tProfileName & "," & tSetting ] then
1124+ add 1 to tSettingsUsed
1125+ next repeat
1126+ end if
1127+ -- since the setting is not used, clear associated keys
1128+ filter tKeys with (tProfileName & "," & tSetting & "*" ) into tExtraKeys
1129+ repeat for each line tKey in tExtraKeys
1130+ delete variable tGeometry [tKey ]
1131+ end repeat
1132+ end repeat
1133+ if tSettingsUsed is 0 then
1134+ -- no geometry settings are used, clear everything else
1135+ delete variable tGeometry [tProfileName ]
1136+ filter tKeys with (tProfileName & ",*" ) into tExtraKeys
1137+ repeat for each line tKey in tExtraKeys
1138+ delete variable tGeometry [tKey ]
1139+ end repeat
1140+ end if
1141+ set the customProperties["cRevGeometry" ] of lGeometryObject to tGeometry
1142+ end revClearExtraGeometrySettings
0 commit comments