Commit fc423d04 authored by Piotr Różański's avatar Piotr Różański Committed by Marian Dovgialo

#45480 Disabled no-op saving of monitor documents

parent 0a4bc09c
......@@ -485,9 +485,6 @@ public boolean saveDocument(Document document, boolean saveAsOnly) throws IOExce
if (type.equals(ManagedDocumentType.SIGNAL)) {
ok = true;
// do nothing
} else if (type.equals(ManagedDocumentType.MONITOR)) {
ok = true;
// do nothing
} else if (type.equals(ManagedDocumentType.BOOK)) {
ok = true;
// do nothing
......
......@@ -44,7 +44,7 @@
* @author Mariusz Podsiadło
*
*/
public class MonitorSignalDocument extends AbstractSignal implements MutableDocument, PsychopyStatusListener {
public class MonitorSignalDocument extends AbstractSignal implements PsychopyStatusListener {
/**
* A property describing the state of the recording process.
......@@ -98,11 +98,6 @@
*/
private PreviewVideoFrame previewVideoFrame;
/**
* Whether the signal was saved.
*/
private boolean saved = true;
/**
* How often (in milliseconds) should {@link SignalPlot signal plots} be
* refreshed by the {@link RefreshPlotsTimerTask}.
......@@ -180,8 +175,6 @@ public void setDocumentView(DocumentView documentView) {
@Override
public void openDocument() throws SignalMLException, IOException {
setSaved(true);
if (descriptor.getPeer() == null) {
throw new IOException();
}
......@@ -338,33 +331,6 @@ public String getName() {
return name;
}
@Override
public boolean isSaved() {
return saved;
}
@Override
public void setSaved(boolean saved) {
if (this.saved != saved) {
this.saved = saved;
pcSupport.firePropertyChange(AbstractMutableFileDocument.SAVED_PROPERTY, !saved, saved);
}
}
public void invalidate() {
setSaved(false);
}
@Override
public final void saveDocument() throws SignalMLException, IOException {
throw new UnsupportedOperationException(_("Saving monitor document is not supported—use online recording instead."));
}
@Override
public void newDocument() throws SignalMLException {
}
/**
* Starts to record this monitor document samples and tags according to
* the configuration (file names etc.) maintained in the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment