Skip to content

Commit

Permalink
Finish v0.0.0b4
Browse files Browse the repository at this point in the history
  • Loading branch information
cimbi committed Jan 5, 2022
2 parents 8ac6096 + aeb0264 commit cbd41eb
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 1,383 deletions.
42 changes: 21 additions & 21 deletions pysigview/app/main_window.py
Expand Up @@ -57,7 +57,7 @@
from pysigview.core.clients.clients import client_type_evaluator

from pysigview.core import source_manager as sm
from pysigview.core.buffer_handler import MemoryBuffer
# from pysigview.core.buffer_handler import MemoryBuffer
from pysigview.core.thread_workers import TimerWorker
from pysigview.config.utils import get_image_path, get_home_dir

Expand Down Expand Up @@ -460,10 +460,10 @@ def open_data_source(self, path):
# ----- Delete previous data -----

# Delete any previous buffers
if isinstance(sm.PDS, MemoryBuffer):
sm.PDS.terminate_buffer()
sm.PDS.terminate_monitor_thread()
sm.PDS.purge_data()
# if isinstance(sm.PDS, MemoryBuffer):
# sm.PDS.terminate_buffer()
# sm.PDS.terminate_monitor_thread()
# sm.PDS.purge_data()

# Delete data from plugins to be able to open new data source
for plugin in self.plugin_list:
Expand Down Expand Up @@ -491,10 +491,10 @@ def open_data_source(self, path):
ann_group[0])

# Fork for buffer usage
if CONF.get('data_management', 'use_memory_buffer'):
sm.PDS = MemoryBuffer(self)
else:
sm.PDS = sm.ODS
# if CONF.get('data_management', 'use_memory_buffer'):
# sm.PDS = MemoryBuffer(self)
# else:
sm.PDS = sm.ODS

self.statusBar().showMessage('')

Expand Down Expand Up @@ -599,10 +599,10 @@ def connect_to_server(self):
# ----- Delete previous data -----

# Delete any previous buffers
if isinstance(sm.PDS, MemoryBuffer):
sm.PDS.terminate_buffer()
sm.PDS.terminate_monitor_thread()
sm.PDS.purge_data()
# if isinstance(sm.PDS, MemoryBuffer):
# sm.PDS.terminate_buffer()
# sm.PDS.terminate_monitor_thread()
# sm.PDS.purge_data()

# Delete data from plugins to be able to open new data source
for plugin in self.plugin_list:
Expand Down Expand Up @@ -630,10 +630,10 @@ def connect_to_server(self):

# Fork for buffer usage

if CONF.get('data_management', 'use_memory_buffer'):
sm.PDS = MemoryBuffer(self)
else:
sm.PDS = sm.ODS
# if CONF.get('data_management', 'use_memory_buffer'):
# sm.PDS = MemoryBuffer(self)
# else:
sm.PDS = sm.ODS

self.source_opened = True
self.add_path_to_title()
Expand Down Expand Up @@ -955,10 +955,10 @@ def closing(self, cancelable=True):
# if self.toolbars_visible:
# self.save_visible_toolbars()

if isinstance(sm.PDS, MemoryBuffer):
sm.PDS.terminate_buffer()
sm.PDS.terminate_monitor_thread()
sm.PDS.purge_data()
# if isinstance(sm.PDS, MemoryBuffer):
# sm.PDS.terminate_buffer()
# sm.PDS.terminate_monitor_thread()
# sm.PDS.purge_data()

self.already_closed = True
return True
Expand Down
12 changes: 6 additions & 6 deletions pysigview/config/main.py
Expand Up @@ -52,11 +52,11 @@
'window/is_fullscreen': False,
'window/prefs_dialog_size': (745, 411)
},
'data_management': {'use_memory_buffer': False,
'use_disk_buffer': False,
'n_chunks_before': 1,
'n_chunks_after': 1,
},
# 'data_management': {'use_memory_buffer': False,
# 'use_disk_buffer': False,
# 'n_chunks_before': 1,
# 'n_chunks_after': 1,
# },
'signal_display': {'n_cols': 1,
'plot_method': 'gl', # gl or agg
'bgcolor': '#606060ff',
Expand Down Expand Up @@ -101,7 +101,7 @@
},
}

CONF_VERSION = '0.6.0'
CONF_VERSION = '0.7.0'

# Main configuration instance
try:
Expand Down

0 comments on commit cbd41eb

Please sign in to comment.