Fix #332 - imports allowed when read-only

This commit is contained in:
David Vierra 2017-06-27 19:51:19 -10:00
parent 055a947ab5
commit d41c298cda

View File

@ -800,6 +800,9 @@ class EditorSession(QtCore.QObject):
self.copiedSchematic = showProgress("Copying...", task) self.copiedSchematic = showProgress("Copying...", task)
def paste(self): def paste(self):
if self.readonly:
return
if self.copiedSchematic is None: if self.copiedSchematic is None:
return return
view = self.editorTab.currentView() view = self.editorTab.currentView()
@ -1119,6 +1122,9 @@ class EditorSession(QtCore.QObject):
return return
def placeSchematic(self, schematic, importPos=None, name="Unknown"): def placeSchematic(self, schematic, importPos=None, name="Unknown"):
if self.readonly:
return
ray = self.editorTab.currentView().rayAtCenter() ray = self.editorTab.currentView().rayAtCenter()
if importPos is not None: if importPos is not None:
pos = importPos pos = importPos