Fix #332 - imports allowed when read-only
This commit is contained in:
parent
055a947ab5
commit
d41c298cda
@ -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
|
||||||
|
Reference in New Issue
Block a user