From f8e5446cfe8b548d6f6ce30f2077ce85221018fb Mon Sep 17 00:00:00 2001
From: Lewin Probst <info@emirror.de>
Date: Fri, 29 Nov 2019 14:25:05 +0100
Subject: [PATCH] The first 7 columns are now locked.

---
 .../+edit/+offsets/tableSoundsourceOffsetsEdit.m | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/lib/+artoa/+controller/+edit/+offsets/tableSoundsourceOffsetsEdit.m b/lib/+artoa/+controller/+edit/+offsets/tableSoundsourceOffsetsEdit.m
index aba5830..98925ff 100644
--- a/lib/+artoa/+controller/+edit/+offsets/tableSoundsourceOffsetsEdit.m
+++ b/lib/+artoa/+controller/+edit/+offsets/tableSoundsourceOffsetsEdit.m
@@ -1,10 +1,24 @@
-function [] = tableSoundsourceOffsetsEdit(~, ~)
+function [] = tableSoundsourceOffsetsEdit(~, event)
 %TABLESOUNDSOURCEOFFSETSEDIT Summary of this function goes here
 %   Detailed explanation goes here
 
 
 global artoaGui artoaWorkspace artoaDataInput;
 
+%% Get data
+try
+    selectedColumn = event.Indices(2);
+    selectedRow = event.Indices(:, 1);
+catch
+    return;
+end
+
+%% Check if the column that has been edited is locked
+if 1 <= selectedColumn & selectedColumn <= 7
+    artoa.controller.edit.offsets.updateGui();
+    return;
+end
+
 %% Save to workspace
 artoaWorkspace.editOffsets.soundsourceOffsets(:, :) = artoaGui.editOffsets.tableSoundsourceOffsets.Data;
 
-- 
GitLab