Fix loading tools in magazine controls

This commit is contained in:
Lucio Maranta
2019-04-19 13:16:04 +02:00
parent fa2082209e
commit c3da370a01
3 changed files with 22 additions and 6 deletions
+15 -1
View File
@@ -155,7 +155,7 @@ Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}; Filen
[Run]
; Install .net
Filename: {tmp}\{#DotNetInstallerName}; Description: {cm:InstallDotNet}; WorkingDir:{tmp}; StatusMsg: {cm:InstallingDotNet}; Check: FrameworkIsNotInstalled
Filename: {tmp}\{#DotNetInstallerName}; Description: {cm:InstallDotNet}; WorkingDir:{tmp}; StatusMsg: {cm:InstallingDotNet}; Check: NetFrameworkIsMissing
; Install MariaDb
Filename: "msiexec.exe"; Description: {cm:InstallDotNet}; WorkingDir:{tmp}; StatusMsg: {cm:InstallingMariaDB}; Parameters: "/i {tmp}\{#MariaDBInstallerName}"
@@ -200,6 +200,20 @@ var
Result := not RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\.NETFramework\policy\v4.0');
end;
function NetFrameworkIsMissing(): Boolean;
var
bSuccess: Boolean;
regVersion: Cardinal;
begin
Result := True;
bSuccess := RegQueryDWordValue(HKLM, 'Software\Microsoft\NET Framework Setup\NDP\v4\Full', 'Release', regVersion);
if (True = bSuccess) and (regVersion >= 394802) then begin
Result := False;
end;
end;
///////////////// CreateCustomInputOptionCMsorSCM //////////////////////////
procedure CreateCustomInputOptionCMSorSCM;
begin
@@ -615,7 +615,7 @@ export default class depot extends Vue {
// SIEMENS
public doAddToDepotPosition(position, event) {
if (this.draggingTool && this.draggingPosition == position.positionId) {
if (this.toolAtPosition(position.positionId) || !position.canLoadTool || position.occupied)
if (this.toolAtPosition(position.positionId) || !position.canLoadTool || position.occupied || !this.checkMagPosType(position.type))
return
this.draggingIn = false;
@@ -630,8 +630,9 @@ export default class depot extends Vue {
// OSAI-FANUC
public doAddToNcDepotPosition(position, event) {
if (this.draggingTool && this.draggingPosition == position.positionId) {
if (this.ncToolAtPosition(position.positionId) || !position.canLoadTool)
if (this.ncToolAtPosition(position.positionId) || !position.canLoadTool || !this.checkMagPosType(position.type))
return
this.draggingIn = false;
this.draggingTool = null;
var shankToAdd = event.payload;
+4 -3
View File
@@ -193,11 +193,12 @@ export const toolingStore = {
}
},
positionCompatible : (state) => (id, posType) : boolean =>{
if(!posType || posType==0)
return true;
var isSiemens = machineInfoStore.state.isSiemens;
if(isSiemens) {
if(!posType || posType==0)
return true;
// Find tool
let tool = state.tools.find(t => t.id === id);
if(tool) {