[med-svn] [edfbrowser] 01/06: New upstream version 1.62+dfsg

Andreas Tille tille at debian.org
Tue Jan 16 15:05:51 UTC 2018


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository edfbrowser.

commit da2787daa8a6074095fdd270ad1bda1c355bc0f8
Author: Andreas Tille <tille at debian.org>
Date:   Tue Jan 16 15:53:01 2018 +0100

    New upstream version 1.62+dfsg
---
 README.txt                                        |  14 +-
 about_dialog.cpp                                  |   4 +-
 about_dialog.h                                    |   2 +-
 active_file_chooser.cpp                           |   2 +-
 active_file_chooser.h                             |   2 +-
 adjustfiltersettings.cpp                          |   2 +-
 adjustfiltersettings.h                            |   2 +-
 annotations_dock.cpp                              |   2 +-
 annotations_dock.h                                |   2 +-
 annotlist_filter_dialog.cpp                       |   2 +-
 annotlist_filter_dialog.h                         |   2 +-
 ascii2edf.cpp                                     |   2 +-
 ascii2edf.h                                       |   2 +-
 ascii_export.cpp                                  |   2 +-
 ascii_export.h                                    |   2 +-
 averager_curve_wnd.cpp                            |   2 +-
 averager_curve_wnd.h                              |   2 +-
 averager_dialog.cpp                               |   2 +-
 averager_dialog.h                                 |   2 +-
 bdf2edf.cpp                                       |   2 +-
 bdf2edf.h                                         |   2 +-
 bdf_triggers.cpp                                  |   2 +-
 bdf_triggers.h                                    |   2 +-
 bi9800.cpp                                        |   2 +-
 bi9800.h                                          |   2 +-
 biosemi2bdfplus.cpp                               |   2 +-
 biosemi2bdfplus.h                                 |   2 +-
 biox2edf.cpp                                      |   2 +-
 biox2edf.h                                        |   2 +-
 check_edf_file.cpp                                |   2 +-
 check_edf_file.h                                  |   2 +-
 check_for_updates.cpp                             |   2 +-
 check_for_updates.h                               |   2 +-
 colordialog.cpp                                   |   2 +-
 colordialog.h                                     |   2 +-
 date_time_stamp_parser.c                          |   2 +-
 date_time_stamp_parser.h                          |   2 +-
 doc/manual.html                                   |  12 +-
 ecg_export.cpp                                    |   9 +-
 ecg_export.h                                      |   2 +-
 ecg_filter.cpp                                    |   3 +-
 ecg_filter.h                                      |   2 +-
 edf_annot_list.c                                  |  25 +++-
 edf_annot_list.h                                  |   3 +-
 edf_annotations.cpp                               |  13 +-
 edf_annotations.h                                 |   2 +-
 edf_compat.cpp                                    |   2 +-
 edf_compat.h                                      |   2 +-
 edf_helper.c                                      |   2 +-
 edf_helper.h                                      |   2 +-
 edfplusd_cnv.cpp                                  |   2 +-
 edfplusd_cnv.h                                    |   2 +-
 edit_annotation_dock.cpp                          |   9 +-
 edit_annotation_dock.h                            |   2 +-
 edit_predefined_mtg.cpp                           |   2 +-
 edit_predefined_mtg.h                             |   2 +-
 emsa2edf.cpp                                      |   7 +-
 emsa2edf.h                                        |   2 +-
 export_annotations.cpp                            |   2 +-
 export_annotations.h                              |   2 +-
 export_filtered_signals.cpp                       |   2 +-
 export_filtered_signals.h                         |   2 +-
 filter.cpp                                        |   2 +-
 filter.h                                          |   2 +-
 filter_dialog.cpp                                 |   2 +-
 filter_dialog.h                                   |   2 +-
 filtercurve.cpp                                   |   2 +-
 filtercurve.h                                     |   2 +-
 filteredblockread.cpp                             |   2 +-
 filteredblockread.h                               |   2 +-
 fino2edf.cpp                                      |   2 +-
 fino2edf.h                                        |   2 +-
 flywheel.cpp                                      |   2 +-
 flywheel.h                                        |   2 +-
 fma_ecg2edf.cpp                                   |   2 +-
 fma_ecg2edf.h                                     |   2 +-
 global.h                                          |   4 +-
 header_editor.cpp                                 |   2 +-
 header_editor.h                                   |   2 +-
 images.qrc                                        |  11 ++
 images/edf.ico                                    | Bin 3774 -> 1662 bytes
 images/edf.png                                    | Bin 673 -> 755 bytes
 images/go-down-symbolic.symbolic.png              | Bin 0 -> 172 bytes
 images/go-first-symbolic-rtl.symbolic.png         | Bin 0 -> 176 bytes
 images/go-first-symbolic.symbolic.png             | Bin 0 -> 176 bytes
 images/go-next-symbolic-rtl.symbolic.png          | Bin 0 -> 149 bytes
 images/go-next-symbolic.symbolic.png              | Bin 0 -> 153 bytes
 images/go-up-symbolic.symbolic.png                | Bin 0 -> 161 bytes
 images/media-playback-pause-symbolic.symbolic.png | Bin 0 -> 110 bytes
 images/media-playback-start-symbolic.symbolic.png | Bin 0 -> 165 bytes
 images/media-playback-stop-symbolic.symbolic.png  | Bin 0 -> 103 bytes
 images/splash.png                                 | Bin 9150 -> 9297 bytes
 images/zoom-in-symbolic.symbolic.png              | Bin 0 -> 170 bytes
 images/zoom-out-symbolic.symbolic.png             | Bin 0 -> 162 bytes
 import_annotations.cpp                            |   2 +-
 import_annotations.h                              |   2 +-
 jump_dialog.cpp                                   |   2 +-
 jump_dialog.h                                     |   2 +-
 load_montage_dialog.cpp                           |   4 +-
 load_montage_dialog.h                             |   2 +-
 mainwindow.cpp                                    |  22 ++-
 mainwindow.h                                      |   6 +-
 mainwindow_constr.cpp                             | 123 ++++++++++-------
 manscan2edf.cpp                                   |   2 +-
 manscan2edf.h                                     |   2 +-
 mit2edf.cpp                                       |   2 +-
 mit2edf.h                                         |   2 +-
 nexfin2edf.cpp                                    |   2 +-
 nexfin2edf.h                                      |   2 +-
 nk2edf.cpp                                        |   2 +-
 nk2edf.h                                          |   2 +-
 options_dialog.cpp                                |   2 +-
 options_dialog.h                                  |   2 +-
 pagetime_dialog.cpp                               |   2 +-
 pagetime_dialog.h                                 |   2 +-
 plif_ecg_subtract_filter.c                        |   2 +-
 plif_ecg_subtract_filter.h                        |   2 +-
 plif_ecg_subtract_filter_dialog.cpp               |   2 +-
 plif_ecg_subtract_filter_dialog.h                 |   2 +-
 popup_save_cancelwindow.cpp                       |   2 +-
 popup_save_cancelwindow.h                         |   2 +-
 print_to_bdf.cpp                                  |   2 +-
 print_to_bdf.h                                    |   2 +-
 print_to_edf.cpp                                  |   2 +-
 print_to_edf.h                                    |   2 +-
 ravg_filter.cpp                                   |   2 +-
 ravg_filter.h                                     |   2 +-
 raw2edf.cpp                                       |   4 +-
 raw2edf.h                                         |   2 +-
 read_write_settings.cpp                           |   4 +-
 reduce_signals.cpp                                |   2 +-
 reduce_signals.h                                  |   2 +-
 save_annots.cpp                                   |   2 +-
 save_annots.h                                     |   2 +-
 save_montage_dialog.cpp                           |   2 +-
 save_montage_dialog.h                             |   2 +-
 scp_ecg2edf.cpp                                   |  23 ++--
 scp_ecg2edf.h                                     |   2 +-
 show_actual_montage_dialog.cpp                    |   2 +-
 show_actual_montage_dialog.h                      |   2 +-
 show_edf_hdr.cpp                                  |   2 +-
 show_edf_hdr.h                                    |   2 +-
 signal_chooser.cpp                                |   2 +-
 signal_chooser.h                                  |   2 +-
 signalcurve.cpp                                   |   2 +-
 signalcurve.h                                     |   2 +-
 signals_dialog.cpp                                |   2 +-
 signals_dialog.h                                  |   2 +-
 special_button.cpp                                |   2 +-
 special_button.h                                  |   2 +-
 spectrum_dock.cpp                                 |  44 ++++--
 spectrum_dock.h                                   |   3 +-
 spectrumanalyzer.cpp                              |   2 +-
 spectrumanalyzer.h                                |   2 +-
 spike_filter.cpp                                  |   2 +-
 spike_filter.h                                    |   2 +-
 spike_filter_dialog.cpp                           |   2 +-
 spike_filter_dialog.h                             |   2 +-
 statistics_dialog.cpp                             |  28 +++-
 statistics_dialog.h                               |   3 +-
 unisens2edf.cpp                                   |   2 +-
 unisens2edf.h                                     |   2 +-
 utc_date_time.c                                   |   2 +-
 utc_date_time.h                                   |   2 +-
 utils.c                                           | 161 +++++++++++++++-------
 utils.h                                           |   3 +-
 version.txt                                       |  15 ++
 videoplayer.cpp                                   |   2 +-
 view_montage_dialog.cpp                           |   2 +-
 view_montage_dialog.h                             |   2 +-
 viewbuf.cpp                                       |   2 +-
 viewcurve.cpp                                     |  16 +--
 viewcurve.h                                       |   2 +-
 wav2edf.cpp                                       |   2 +-
 wav2edf.h                                         |   2 +-
 xml.cpp                                           |   2 +-
 xml.h                                             |   2 +-
 z_ratio_filter.cpp                                |   2 +-
 z_ratio_filter.h                                  |   2 +-
 z_score_dialog.cpp                                |   2 +-
 z_score_dialog.h                                  |   2 +-
 181 files changed, 533 insertions(+), 320 deletions(-)

diff --git a/README.txt b/README.txt
index 9e36472..c26b345 100644
--- a/README.txt
+++ b/README.txt
@@ -75,7 +75,7 @@ Now you can run the program by typing: edfbrowser
 
 In case you insist on using Qt5, the recommended way is not to use the Qt5 libraries that comes with your distro.
 Instead, download and compile the Qt5 source and use that to compile EDFbrowser.
-Here's a step by step list of instuctions:
+Here's a step by step list with instructions:
 
 First, fulfill the requirements for Qt:
 
@@ -95,7 +95,7 @@ openSUSE: sudo zypper install -t pattern devel_basis
 #                                                                                           #
 # This will not mess with your system libraries. The new compiled libraries will be stored  #
 #                                                                                           #
-# in a new and separate directory: /usr/local/Qt-5.9.2                                      #
+# in a new and separate directory: /usr/local/Qt-5.9.3                                      #
 #                                                                                           #
 # It will not interfere with other Qt programs.                                             #
 #                                                                                           #
@@ -105,14 +105,14 @@ mkdir Qt5-source
 
 cd Qt5-source
 
-wget http://ftp1.nluug.nl/languages/qt/official_releases/qt/5.9/5.9.2/single/qt-everywhere-opensource-src-5.9.2.tar.xz
+wget http://ftp1.nluug.nl/languages/qt/official_releases/qt/5.9/5.9.3/single/qt-everywhere-opensource-src-5.9.3.tar.xz
 
 here is a list of download mirrors: https://download.qt.io/static/mirrorlist/
-The Qt source package you are going to need is: qt-everywhere-opensource-src-5.9.2.tar.xz
+The Qt source package you are going to need is: qt-everywhere-opensource-src-5.9.3.tar.xz
 
-tar -xvf qt-everywhere-opensource-src-5.9.2.tar.xz
+tar -xvf qt-everywhere-opensource-src-5.9.3.tar.xz
 
-cd qt-everywhere-opensource-src-5.9.2
+cd qt-everywhere-opensource-src-5.9.3
 
 ./configure -v -release -opensource -confirm-license -c++std c++11 -static -accessibility -fontconfig -skip qtdeclarative -skip qtconnectivity -skip qtmultimedia -no-qml-debug -qt-zlib -no-mtdev -no-journald -qt-libpng -qt-libjpeg -system-freetype -qt-harfbuzz -no-openssl -no-libproxy -no-glib -nomake examples -nomake tests -no-compile-examples -cups -no-evdev -no-dbus -no-eglfs -qreal double -no-opengl -skip qtlocation -skip qtsensors -skip qtwayland -skip qtgamepad -skip qtserialbus
 
@@ -126,7 +126,7 @@ sudo make install
 
 Now go to the directory that contains the EDFbrowser sourcecode and enter the following commands:
 
-/usr/local/Qt-5.9.2/bin/qmake
+/usr/local/Qt-5.9.3/bin/qmake
 
 make -j8
 
diff --git a/about_dialog.cpp b/about_dialog.cpp
index ab45821..72f3f1b 100644
--- a/about_dialog.cpp
+++ b/about_dialog.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
@@ -67,7 +67,7 @@ UI_Aboutwindow::UI_Aboutwindow(UI_Mainwindow *mainwindow)
   textedit1->setPlainText(
         "\n " PROGRAM_NAME " " PROGRAM_VERSION "\n"
         "\n This program is made by Teunis van Beelen.\n"
-        "\n Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen.\n"
+        "\n Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen.\n"
         "\n Email: teuniz at gmail.com\n"
         "\n Disclaimer:\n"
         " Despite this software is intend to be useful, there is no warranty, use this software at your own risk!\n"
diff --git a/about_dialog.h b/about_dialog.h
index 0926a1f..881e197 100644
--- a/about_dialog.h
+++ b/about_dialog.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/active_file_chooser.cpp b/active_file_chooser.cpp
index 8f9a78e..ca2ef55 100644
--- a/active_file_chooser.cpp
+++ b/active_file_chooser.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/active_file_chooser.h b/active_file_chooser.h
index fb23c6f..c216da3 100644
--- a/active_file_chooser.h
+++ b/active_file_chooser.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/adjustfiltersettings.cpp b/adjustfiltersettings.cpp
index ea63153..ea2f2c3 100644
--- a/adjustfiltersettings.cpp
+++ b/adjustfiltersettings.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/adjustfiltersettings.h b/adjustfiltersettings.h
index 73e326c..39f6b07 100644
--- a/adjustfiltersettings.h
+++ b/adjustfiltersettings.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/annotations_dock.cpp b/annotations_dock.cpp
index cfd8dd2..661e3de 100644
--- a/annotations_dock.cpp
+++ b/annotations_dock.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/annotations_dock.h b/annotations_dock.h
index d72d09a..8bea9a9 100644
--- a/annotations_dock.h
+++ b/annotations_dock.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/annotlist_filter_dialog.cpp b/annotlist_filter_dialog.cpp
index 00eaecf..349565d 100644
--- a/annotlist_filter_dialog.cpp
+++ b/annotlist_filter_dialog.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2017 Teunis van Beelen
+* Copyright (C) 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/annotlist_filter_dialog.h b/annotlist_filter_dialog.h
index 726a9ae..b9a55b0 100644
--- a/annotlist_filter_dialog.h
+++ b/annotlist_filter_dialog.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2017 Teunis van Beelen
+* Copyright (C) 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/ascii2edf.cpp b/ascii2edf.cpp
index b3d78dc..d3d093a 100644
--- a/ascii2edf.cpp
+++ b/ascii2edf.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/ascii2edf.h b/ascii2edf.h
index f1476d6..8dbabb2 100644
--- a/ascii2edf.h
+++ b/ascii2edf.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/ascii_export.cpp b/ascii_export.cpp
index 46e35ae..4b294f9 100644
--- a/ascii_export.cpp
+++ b/ascii_export.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/ascii_export.h b/ascii_export.h
index 9249b12..05c1279 100644
--- a/ascii_export.h
+++ b/ascii_export.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/averager_curve_wnd.cpp b/averager_curve_wnd.cpp
index 76f9ef0..b3bd9ae 100644
--- a/averager_curve_wnd.cpp
+++ b/averager_curve_wnd.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/averager_curve_wnd.h b/averager_curve_wnd.h
index dbd57cd..d7ecd7f 100644
--- a/averager_curve_wnd.h
+++ b/averager_curve_wnd.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/averager_dialog.cpp b/averager_dialog.cpp
index 8757b71..f3b2237 100644
--- a/averager_dialog.cpp
+++ b/averager_dialog.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/averager_dialog.h b/averager_dialog.h
index c2cbfbd..fba8ca9 100644
--- a/averager_dialog.h
+++ b/averager_dialog.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/bdf2edf.cpp b/bdf2edf.cpp
index fcc019b..adb3f81 100644
--- a/bdf2edf.cpp
+++ b/bdf2edf.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/bdf2edf.h b/bdf2edf.h
index 7919eca..605df7b 100644
--- a/bdf2edf.h
+++ b/bdf2edf.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/bdf_triggers.cpp b/bdf_triggers.cpp
index 7d87b79..ae6f182 100644
--- a/bdf_triggers.cpp
+++ b/bdf_triggers.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/bdf_triggers.h b/bdf_triggers.h
index b816a01..d905b29 100644
--- a/bdf_triggers.h
+++ b/bdf_triggers.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/bi9800.cpp b/bi9800.cpp
index 287cf93..3b8e74e 100644
--- a/bi9800.cpp
+++ b/bi9800.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/bi9800.h b/bi9800.h
index af2bcec..d708eb8 100644
--- a/bi9800.h
+++ b/bi9800.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/biosemi2bdfplus.cpp b/biosemi2bdfplus.cpp
index 0871f43..9a4dd5b 100644
--- a/biosemi2bdfplus.cpp
+++ b/biosemi2bdfplus.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/biosemi2bdfplus.h b/biosemi2bdfplus.h
index 4411ebc..e67da26 100644
--- a/biosemi2bdfplus.h
+++ b/biosemi2bdfplus.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/biox2edf.cpp b/biox2edf.cpp
index 87c206c..1f5206f 100644
--- a/biox2edf.cpp
+++ b/biox2edf.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/biox2edf.h b/biox2edf.h
index 5e540c7..be64d72 100644
--- a/biox2edf.h
+++ b/biox2edf.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/check_edf_file.cpp b/check_edf_file.cpp
index dd3b099..4e8d606 100644
--- a/check_edf_file.cpp
+++ b/check_edf_file.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/check_edf_file.h b/check_edf_file.h
index 10682e3..fcb9faa 100644
--- a/check_edf_file.h
+++ b/check_edf_file.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/check_for_updates.cpp b/check_for_updates.cpp
index 8bf2ff9..c084cd5 100644
--- a/check_for_updates.cpp
+++ b/check_for_updates.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/check_for_updates.h b/check_for_updates.h
index a38d97c..11aaac3 100644
--- a/check_for_updates.h
+++ b/check_for_updates.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/colordialog.cpp b/colordialog.cpp
index 88572e7..190fbb6 100644
--- a/colordialog.cpp
+++ b/colordialog.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/colordialog.h b/colordialog.h
index 872de93..a30dc6d 100644
--- a/colordialog.h
+++ b/colordialog.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/date_time_stamp_parser.c b/date_time_stamp_parser.c
index f622955..c52e479 100644
--- a/date_time_stamp_parser.c
+++ b/date_time_stamp_parser.c
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/date_time_stamp_parser.h b/date_time_stamp_parser.h
index 92f24b2..cf38c9c 100644
--- a/date_time_stamp_parser.h
+++ b/date_time_stamp_parser.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/doc/manual.html b/doc/manual.html
index f0583c3..ea44cd3 100644
--- a/doc/manual.html
+++ b/doc/manual.html
@@ -7,7 +7,7 @@
     <meta name="description" content="EDFbrowser manual">
 </head><body>
 
-<h1>EDFbrowser 1.61 manual</h1>
+<h1>EDFbrowser 1.62 manual</h1>
 
 <p><br></p>
 
@@ -48,13 +48,13 @@
   <li><a href="#Timelock">Timelock / File synchronisation</a></li>
   <li><a href="#File_Info">File info / header / properties</a></li>
   <li><a href="#Header_editor">Header editor</a></li>
-  <li><a href="#EDFBDF_to_ASCII_format_converter">EDF(+)/BDF(+) to ASCII format converter</a></li>
+  <li><a href="#EDFBDF_to_ASCII_format_converter">EDF(+)/BDF(+) to ASCII (CSV) format converter</a></li>
   <li><a href="#Reduce_signals">Reduce signals, duration and/or samplerate</a></li>
   <li><a href="#Export_filtered_signals">Export filtered signals</a></li>
   <li><a href="#Export_annotations">Export annotations/events</a></li>
   <li><a href="#Import_annotations">Import annotations/events</a></li>
   <li><a href="#Z_EEG">Z-EEG</a></li>
-  <li><a href="#ASCII_to_EDF_converter">ASCII to EDF/BDF format converter</a></li>
+  <li><a href="#ASCII_to_EDF_converter">ASCII (CSV) to EDF/BDF format converter</a></li>
   <li><a href="#Nihon_Kohden_to_EDF_format_converter">Nihon Kohden to EDF(+) format converter</a></li>
   <li><a href="#UNISENS_TO_EDFPLUS">Unisens to EDF+ format converter</a></li>
   <li><a href="#SCP_ECG_to_EDFplus">SCP ECG to EDF+ format converter</a></li>
@@ -832,7 +832,7 @@
 
 <p><br><br></p>
 
-<h3><a name="EDFBDF_to_ASCII_format_converter">EDF(+)/BDF(+) to ASCII format converter</a></h3>
+<h3><a name="EDFBDF_to_ASCII_format_converter">EDF(+)/BDF(+) to ASCII (CSV) format converter</a></h3>
 
 <p>
   This tool converts all the signals in an EDF or BDF-file to a plain ASCII text-file.<br>
@@ -1045,8 +1045,6 @@
   The algorithm is derived from<br>
 <br>
   <a href="http://www.ncbi.nlm.nih.gov/pubmed/8746389/">http://www.ncbi.nlm.nih.gov/pubmed/8746389/</a><br>
-<br>
-  <a href="http://www.zzzratio.com/Z-bib.pdf">http://www.zzzratio.com/Z-bib.pdf</a>
 </p>
 
 <p><br></p>
@@ -1055,7 +1053,7 @@
 
 <p><br><br></p>
 
-<h3><a name="ASCII_to_EDF_converter">ASCII to EDF/BDF format converter</a></h3>
+<h3><a name="ASCII_to_EDF_converter">ASCII (CSV) to EDF/BDF format converter</a></h3>
 
 <p>
   This tool converts an ASCII-file (.csv or .txt file) to EDF or BDF. The following rules apply:<br>
diff --git a/ecg_export.cpp b/ecg_export.cpp
index 1cd5dc8..89c989a 100644
--- a/ecg_export.cpp
+++ b/ecg_export.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
@@ -248,6 +248,10 @@ void UI_ECGExport::Export_RR_intervals()
       mainwindow->annotationlist_backup = edfplus_annotation_create_list_copy(&mainwindow->edfheaderlist[filenum]->annot_list);
     }
 
+    memset(&annotation, 0, sizeof(struct annotationblock));
+    strncpy(annotation.annotation, "R-onset", MAX_ANNOTATION_LEN);
+    annotation.annotation[MAX_ANNOTATION_LEN] = 0;
+
     for(i=0; i<beat_cnt; i++)
     {
       if(whole_recording)
@@ -277,10 +281,7 @@ void UI_ECGExport::Export_RR_intervals()
         l_time += (mainwindow->edfheaderlist[mainwindow->sel_viewtime]->viewtime - signalcomp->edfhdr->viewtime);
       }
 
-      memset(&annotation, 0, sizeof(struct annotationblock));
       annotation.onset = l_time;
-      strncpy(annotation.annotation, "R-onset", MAX_ANNOTATION_LEN);
-      annotation.annotation[MAX_ANNOTATION_LEN] = 0;
       edfplus_annotation_add_item(&mainwindow->edfheaderlist[filenum]->annot_list, annotation);
     }
 
diff --git a/ecg_export.h b/ecg_export.h
index b839946..c35babc 100644
--- a/ecg_export.h
+++ b/ecg_export.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/ecg_filter.cpp b/ecg_filter.cpp
index 5b5c325..0236b5b 100644
--- a/ecg_filter.cpp
+++ b/ecg_filter.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
@@ -741,6 +741,7 @@ void free_ecg_filter(struct ecg_filter_settings *settings)
   free(settings->avgfilter_35_buf);
   free(settings->avgfilter_35_buf_bu);
   free(settings->avgfilter_25_buf);
+  free(settings->avgfilter_25_buf_bu);
   free(settings->SV);
   free(settings->F);
   free(settings->F_bu);
diff --git a/ecg_filter.h b/ecg_filter.h
index b9aa991..ca21ef5 100644
--- a/ecg_filter.h
+++ b/ecg_filter.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/edf_annot_list.c b/edf_annot_list.c
index 6768a31..c6a335e 100644
--- a/edf_annot_list.c
+++ b/edf_annot_list.c
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
@@ -189,6 +189,29 @@ struct annotationblock * edfplus_annotation_get_item_visible_only(struct annotat
 }
 
 
+struct annotationblock * edfplus_annotation_get_item_visible_only_cached(struct annotation_list *list, int n, int *i, int *j)
+{
+  if(list == NULL)  return NULL;
+
+  if((n >= list->sz) || (n < 0))  return NULL;
+
+  for(; *i<list->sz; (*i)++)
+  {
+    if(list->items[list->idx[*i]].hided_in_list)
+    {
+      continue;
+    }
+
+    if(n == (*j)++)
+    {
+      return &list->items[list->idx[(*i)++]];
+    }
+  }
+
+  return NULL;
+}
+
+
 int edfplus_annotation_get_index_at(struct annotation_list *list, long long onset, int start)
 {
   int i;
diff --git a/edf_annot_list.h b/edf_annot_list.h
index aeff32f..e8cae67 100644
--- a/edf_annot_list.h
+++ b/edf_annot_list.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
@@ -72,6 +72,7 @@ void edfplus_annotation_empty_list(struct annotation_list *);
 void edfplus_annotation_remove_item(struct annotation_list *, int);
 struct annotationblock * edfplus_annotation_get_item(struct annotation_list *, int);
 struct annotationblock * edfplus_annotation_get_item_visible_only(struct annotation_list *, int);
+struct annotationblock * edfplus_annotation_get_item_visible_only_cached(struct annotation_list *, int, int *, int *);
 int edfplus_annotation_get_index(struct annotation_list *, struct annotationblock *);
 void edfplus_annotation_sort(struct annotation_list *, void (*)(void));
 struct annotation_list * edfplus_annotation_create_list_copy(struct annotation_list *);
diff --git a/edf_annotations.cpp b/edf_annotations.cpp
index f148f59..1349f57 100644
--- a/edf_annotations.cpp
+++ b/edf_annotations.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
@@ -652,14 +652,19 @@ int EDF_annotations::is_onset_number(char *str)
 
 long long EDF_annotations::get_long_time(char *str)
 {
-  int i, len, hasdot=0, dotposition=0;
+  int i, len, hasdot=0, dotposition=0, neg=0;
 
   long long value=0, radix;
 
-  if((str[0] == '+') || (str[0] == '-'))
+  if(str[0] == '+')
   {
     str++;
   }
+  else if(str[0] == '-')
+    {
+      neg = 1;
+      str++;
+    }
 
   len = strlen(str);
 
@@ -702,7 +707,7 @@ long long EDF_annotations::get_long_time(char *str)
     }
   }
 
-  if(str[-1]=='-')  value = -value;
+  if(neg)  value = -value;
 
   return(value);
 }
diff --git a/edf_annotations.h b/edf_annotations.h
index ce4bcbc..6a4940a 100644
--- a/edf_annotations.h
+++ b/edf_annotations.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/edf_compat.cpp b/edf_compat.cpp
index f946773..3878883 100644
--- a/edf_compat.cpp
+++ b/edf_compat.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/edf_compat.h b/edf_compat.h
index da69d5b..2fac44d 100644
--- a/edf_compat.h
+++ b/edf_compat.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/edf_helper.c b/edf_helper.c
index 75591af..15c3986 100644
--- a/edf_helper.c
+++ b/edf_helper.c
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/edf_helper.h b/edf_helper.h
index 6a282c8..bc14834 100644
--- a/edf_helper.h
+++ b/edf_helper.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/edfplusd_cnv.cpp b/edfplusd_cnv.cpp
index ea09601..60d05ea 100644
--- a/edfplusd_cnv.cpp
+++ b/edfplusd_cnv.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/edfplusd_cnv.h b/edfplusd_cnv.h
index dcb0bdc..4b88882 100644
--- a/edfplusd_cnv.h
+++ b/edfplusd_cnv.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/edit_annotation_dock.cpp b/edit_annotation_dock.cpp
index 8def60f..64eea1e 100644
--- a/edit_annotation_dock.cpp
+++ b/edit_annotation_dock.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
@@ -110,6 +110,13 @@ UI_AnnotationEditwindow::UI_AnnotationEditwindow(QWidget *w_parent)
 
 void UI_AnnotationEditwindow::open_close_dock(bool visible)
 {
+  if(mainwindow->files_open != 1)
+  {
+    dockedit->hide();
+
+    return;
+  }
+
   if(visible==true)
   {
     mainwindow->annot_editor_active = 1;
diff --git a/edit_annotation_dock.h b/edit_annotation_dock.h
index 5ba93b9..5dd136a 100644
--- a/edit_annotation_dock.h
+++ b/edit_annotation_dock.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/edit_predefined_mtg.cpp b/edit_predefined_mtg.cpp
index 6dd3ec3..aba2d55 100644
--- a/edit_predefined_mtg.cpp
+++ b/edit_predefined_mtg.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/edit_predefined_mtg.h b/edit_predefined_mtg.h
index 973c158..a93dca5 100644
--- a/edit_predefined_mtg.h
+++ b/edit_predefined_mtg.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/emsa2edf.cpp b/emsa2edf.cpp
index b4d03b0..7a9ffcd 100644
--- a/emsa2edf.cpp
+++ b/emsa2edf.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
@@ -381,6 +381,7 @@ void UI_EMSA2EDFwindow::SelectFileButton()
   if(len)
   {
     latin1_to_ascii(patientname, len);
+    patientname[len] = 0;
     for(i=0; i<len; i++)
     {
       if(patientname[i]==' ')
@@ -433,6 +434,8 @@ void UI_EMSA2EDFwindow::SelectFileButton()
   {
     latin1_to_ascii(weight + 1, len);
 
+    weight[len] = 0;
+
     weight[0] = ' ';
 
     strcat(weight, " Kg");
@@ -446,6 +449,7 @@ void UI_EMSA2EDFwindow::SelectFileButton()
   if(len)
   {
     latin1_to_ascii(equipment, len);
+    equipment[len] = 0;
     for(i=0; i<len; i++)
     {
       if(equipment[i]==' ')
@@ -770,6 +774,7 @@ void UI_EMSA2EDFwindow::SelectFileButton()
       scratchpad[j] = ' ';
     }
     latin1_to_ascii(scratchpad, 16);
+    scratchpad[len] = 0;
     fseeko(inputfile, (long long)(1025 + (i * 512)), SEEK_SET);
     if((fgetc(inputfile)=='E')&&(len<13))
     {
diff --git a/emsa2edf.h b/emsa2edf.h
index dbce34c..dcc43dd 100644
--- a/emsa2edf.h
+++ b/emsa2edf.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/export_annotations.cpp b/export_annotations.cpp
index b94408e..0c86295 100644
--- a/export_annotations.cpp
+++ b/export_annotations.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/export_annotations.h b/export_annotations.h
index 7b913a3..f03c5a2 100644
--- a/export_annotations.h
+++ b/export_annotations.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/export_filtered_signals.cpp b/export_filtered_signals.cpp
index dbe924c..d96e014 100644
--- a/export_filtered_signals.cpp
+++ b/export_filtered_signals.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2017 Teunis van Beelen
+* Copyright (C) 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/export_filtered_signals.h b/export_filtered_signals.h
index 5aec060..106a0f5 100644
--- a/export_filtered_signals.h
+++ b/export_filtered_signals.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2017 Teunis van Beelen
+* Copyright (C) 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/filter.cpp b/filter.cpp
index 11972b4..a9b1f2a 100644
--- a/filter.cpp
+++ b/filter.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/filter.h b/filter.h
index 2b0aafb..c90cf46 100644
--- a/filter.h
+++ b/filter.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/filter_dialog.cpp b/filter_dialog.cpp
index c69502b..96425f4 100644
--- a/filter_dialog.cpp
+++ b/filter_dialog.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/filter_dialog.h b/filter_dialog.h
index caa4ec2..805f85c 100644
--- a/filter_dialog.h
+++ b/filter_dialog.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/filtercurve.cpp b/filtercurve.cpp
index 9c8d51c..cef8b40 100644
--- a/filtercurve.cpp
+++ b/filtercurve.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/filtercurve.h b/filtercurve.h
index d992a87..0473399 100644
--- a/filtercurve.h
+++ b/filtercurve.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/filteredblockread.cpp b/filteredblockread.cpp
index aa9b8a9..2c886e9 100644
--- a/filteredblockread.cpp
+++ b/filteredblockread.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/filteredblockread.h b/filteredblockread.h
index 4e33744..37f60d3 100644
--- a/filteredblockread.h
+++ b/filteredblockread.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/fino2edf.cpp b/fino2edf.cpp
index c83c6f1..a5efbb9 100644
--- a/fino2edf.cpp
+++ b/fino2edf.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/fino2edf.h b/fino2edf.h
index 303bca7..44bb028 100644
--- a/fino2edf.h
+++ b/fino2edf.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/flywheel.cpp b/flywheel.cpp
index f6b65f7..d23aa8c 100644
--- a/flywheel.cpp
+++ b/flywheel.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/flywheel.h b/flywheel.h
index aef8380..9512a6b 100644
--- a/flywheel.h
+++ b/flywheel.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/fma_ecg2edf.cpp b/fma_ecg2edf.cpp
index d26dbb0..3983fb4 100644
--- a/fma_ecg2edf.cpp
+++ b/fma_ecg2edf.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/fma_ecg2edf.h b/fma_ecg2edf.h
index 13a7012..1033b40 100644
--- a/fma_ecg2edf.h
+++ b/fma_ecg2edf.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/global.h b/global.h
index 2d7c6c9..33e634f 100644
--- a/global.h
+++ b/global.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
@@ -44,7 +44,7 @@
 #endif
 
 #define PROGRAM_NAME "EDFbrowser"
-#define PROGRAM_VERSION "1.61"
+#define PROGRAM_VERSION "1.62"
 #define MINIMUM_QT4_VERSION 0x040701
 #define MINIMUM_QT5_VERSION 0x050901
 #define MAXFILES 32
diff --git a/header_editor.cpp b/header_editor.cpp
index eb58a15..284df63 100644
--- a/header_editor.cpp
+++ b/header_editor.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/header_editor.h b/header_editor.h
index 754d153..f990b0e 100644
--- a/header_editor.h
+++ b/header_editor.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/images.qrc b/images.qrc
index 9f720cc..38153b7 100644
--- a/images.qrc
+++ b/images.qrc
@@ -3,5 +3,16 @@
     <file>images/edf.png</file>
     <file>images/splash.png</file>
     <file>images/ok.png</file>
+    <file>images/go-down-symbolic.symbolic.png</file>
+    <file>images/go-next-symbolic-rtl.symbolic.png</file>
+    <file>images/go-next-symbolic.symbolic.png</file>
+    <file>images/go-up-symbolic.symbolic.png</file>
+    <file>images/media-playback-pause-symbolic.symbolic.png</file>
+    <file>images/media-playback-start-symbolic.symbolic.png</file>
+    <file>images/media-playback-stop-symbolic.symbolic.png</file>
+    <file>images/go-first-symbolic.symbolic.png</file>
+    <file>images/go-first-symbolic-rtl.symbolic.png</file>
+    <file>images/zoom-in-symbolic.symbolic.png</file>
+    <file>images/zoom-out-symbolic.symbolic.png</file>
 </qresource>
 </RCC>
diff --git a/images/edf.ico b/images/edf.ico
index 2d3666c..dbec3b1 100644
Binary files a/images/edf.ico and b/images/edf.ico differ
diff --git a/images/edf.png b/images/edf.png
index a724dc8..b64da21 100644
Binary files a/images/edf.png and b/images/edf.png differ
diff --git a/images/go-down-symbolic.symbolic.png b/images/go-down-symbolic.symbolic.png
new file mode 100644
index 0000000..959f8f9
Binary files /dev/null and b/images/go-down-symbolic.symbolic.png differ
diff --git a/images/go-first-symbolic-rtl.symbolic.png b/images/go-first-symbolic-rtl.symbolic.png
new file mode 100644
index 0000000..1421c06
Binary files /dev/null and b/images/go-first-symbolic-rtl.symbolic.png differ
diff --git a/images/go-first-symbolic.symbolic.png b/images/go-first-symbolic.symbolic.png
new file mode 100644
index 0000000..8eb8d7b
Binary files /dev/null and b/images/go-first-symbolic.symbolic.png differ
diff --git a/images/go-next-symbolic-rtl.symbolic.png b/images/go-next-symbolic-rtl.symbolic.png
new file mode 100644
index 0000000..91b0524
Binary files /dev/null and b/images/go-next-symbolic-rtl.symbolic.png differ
diff --git a/images/go-next-symbolic.symbolic.png b/images/go-next-symbolic.symbolic.png
new file mode 100644
index 0000000..0160522
Binary files /dev/null and b/images/go-next-symbolic.symbolic.png differ
diff --git a/images/go-up-symbolic.symbolic.png b/images/go-up-symbolic.symbolic.png
new file mode 100644
index 0000000..75913f9
Binary files /dev/null and b/images/go-up-symbolic.symbolic.png differ
diff --git a/images/media-playback-pause-symbolic.symbolic.png b/images/media-playback-pause-symbolic.symbolic.png
new file mode 100644
index 0000000..242c7d7
Binary files /dev/null and b/images/media-playback-pause-symbolic.symbolic.png differ
diff --git a/images/media-playback-start-symbolic.symbolic.png b/images/media-playback-start-symbolic.symbolic.png
new file mode 100644
index 0000000..3adfac1
Binary files /dev/null and b/images/media-playback-start-symbolic.symbolic.png differ
diff --git a/images/media-playback-stop-symbolic.symbolic.png b/images/media-playback-stop-symbolic.symbolic.png
new file mode 100644
index 0000000..3fb7dcc
Binary files /dev/null and b/images/media-playback-stop-symbolic.symbolic.png differ
diff --git a/images/splash.png b/images/splash.png
index 6045572..456f95d 100644
Binary files a/images/splash.png and b/images/splash.png differ
diff --git a/images/zoom-in-symbolic.symbolic.png b/images/zoom-in-symbolic.symbolic.png
new file mode 100644
index 0000000..3913411
Binary files /dev/null and b/images/zoom-in-symbolic.symbolic.png differ
diff --git a/images/zoom-out-symbolic.symbolic.png b/images/zoom-out-symbolic.symbolic.png
new file mode 100644
index 0000000..d6cbf43
Binary files /dev/null and b/images/zoom-out-symbolic.symbolic.png differ
diff --git a/import_annotations.cpp b/import_annotations.cpp
index 8c0668a..39e6946 100644
--- a/import_annotations.cpp
+++ b/import_annotations.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/import_annotations.h b/import_annotations.h
index f9a70f0..be8d21f 100644
--- a/import_annotations.h
+++ b/import_annotations.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/jump_dialog.cpp b/jump_dialog.cpp
index aa8ff08..6f796bd 100644
--- a/jump_dialog.cpp
+++ b/jump_dialog.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/jump_dialog.h b/jump_dialog.h
index 6ab9e64..3df4ff9 100644
--- a/jump_dialog.h
+++ b/jump_dialog.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/load_montage_dialog.cpp b/load_montage_dialog.cpp
index 135813b..a5f5abc 100644
--- a/load_montage_dialog.cpp
+++ b/load_montage_dialog.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
@@ -386,7 +386,7 @@ void UI_LoadMontagewindow::LoadButtonClicked()
       {
         strncpy(newsignalcomp->alias, result, 16);
         newsignalcomp->alias[16] = 0;
-        latin1_to_ascii(newsignalcomp->alias, 16);
+        latin1_to_ascii(newsignalcomp->alias, strlen(newsignalcomp->alias));
         remove_trailing_spaces(newsignalcomp->alias);
         remove_leading_spaces(newsignalcomp->alias);
       }
diff --git a/load_montage_dialog.h b/load_montage_dialog.h
index e7ac858..2948462 100644
--- a/load_montage_dialog.h
+++ b/load_montage_dialog.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/mainwindow.cpp b/mainwindow.cpp
index 64e2689..d8e4108 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
@@ -1128,6 +1128,8 @@ void UI_Mainwindow::playback_realtime()
 
     playback_realtime_Act->setText("[stop]");
 
+    playback_realtime_Act->setIcon(QIcon(":/images/media-playback-stop-symbolic.symbolic.png"));
+
     playback_realtime_active = 1;
   }
 }
@@ -1139,6 +1141,8 @@ void UI_Mainwindow::stop_playback_realtime()
 
   playback_realtime_Act->setText("[play]");
 
+  playback_realtime_Act->setIcon(QIcon(":/images/media-playback-start-symbolic.symbolic.png"));
+
   playback_realtime_active = 0;
 }
 
@@ -1360,6 +1364,8 @@ void UI_Mainwindow::open_new_file()
 
   struct edfhdrblock *edfhdr=NULL;
 
+  if(edflib_version() != 113)  return;
+
   if(annot_editor_active && files_open)
   {
     QMessageBox messagewindow(QMessageBox::Critical, "Error", "You can not open multiple files when editing annotations.\n"
@@ -3287,11 +3293,19 @@ void UI_Mainwindow::print_to_img_1600x1200()
 
 long long UI_Mainwindow::get_long_time(char *str)
 {
-  int i, len, hasdot=0, dotposition=0;
+  int i, len, hasdot=0, dotposition=0, neg=0;
 
   long long value=0, radix;
 
-  str = str + 1;
+  if(str[0] == '+')
+  {
+    str++;
+  }
+  else if(str[0] == '-')
+    {
+      neg = 1;
+      str++;
+    }
 
   len = strlen(str);
 
@@ -3334,7 +3348,7 @@ long long UI_Mainwindow::get_long_time(char *str)
     }
   }
 
-  if(str[-1]=='-')  value = -value;
+  if(neg)  value = -value;
 
   return(value);
 }
diff --git a/mainwindow.h b/mainwindow.h
index e596a6c..efe9e00 100644
--- a/mainwindow.h
+++ b/mainwindow.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
@@ -327,6 +327,7 @@ private:
                *displaymenu,
                *amplitudemenu,
                *toolsmenu,
+               *settingsmenu,
                *helpmenu,
                *printmenu,
                *filtermenu,
@@ -436,7 +437,8 @@ private:
 
   QPixmap  *pixmap;
 
-  QToolBar *slidertoolbar;
+  QToolBar *slidertoolbar,
+           *navtoolbar;
 
   QSlider  *positionslider;
 
diff --git a/mainwindow_constr.cpp b/mainwindow_constr.cpp
index 156ca1d..b393f7e 100644
--- a/mainwindow_constr.cpp
+++ b/mainwindow_constr.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
@@ -691,12 +691,12 @@ UI_Mainwindow::UI_Mainwindow()
   toolsmenu->addSeparator();
   toolsmenu->addAction("Import annotations/events", this, SLOT(import_annotations()));
   toolsmenu->addAction("Export annotations/events", this, SLOT(export_annotations()));
-  toolsmenu->addAction("Export EDF/BDF to ASCII", this, SLOT(export_to_ascii()));
+  toolsmenu->addAction("Export EDF/BDF to ASCII (CSV)", this, SLOT(export_to_ascii()));
   toolsmenu->addAction("Export/Import ECG RR-interval", this, SLOT(export_ecg_rr_interval_to_ascii()));
   toolsmenu->addAction("Export Filtered Signals", this, SLOT(export_filtered_signals()));
   toolsmenu->addSeparator();
   toolsmenu->addAction("Convert Nihon Kohden to EDF+", this, SLOT(nk2edf_converter()));
-  toolsmenu->addAction("Convert ASCII to EDF/BDF", this, SLOT(convert_ascii_to_edf()));
+  toolsmenu->addAction("Convert ASCII (CSV) to EDF/BDF", this, SLOT(convert_ascii_to_edf()));
   toolsmenu->addAction("Convert Manscan to EDF+", this, SLOT(convert_manscan_to_edf()));
   toolsmenu->addAction("Convert SCP ECG to EDF+", this, SLOT(convert_scpecg_to_edf()));
   toolsmenu->addAction("Convert MIT (PhysioBank) to EDF+", this, SLOT(convert_mit_to_edf()));
@@ -716,51 +716,10 @@ UI_Mainwindow::UI_Mainwindow()
   toolsmenu->addAction("Options", this, SLOT(show_options_dialog()));
   menubar->addMenu(toolsmenu);
 
-  menubar->addAction("S&ettings", this, SLOT(show_options_dialog()));
-
-  former_page_Act = new QAction("<<", this);
-  former_page_Act->setShortcut(QKeySequence::MoveToPreviousPage);
-  connect(former_page_Act, SIGNAL(triggered()), this, SLOT(former_page()));
-  menubar->addAction(former_page_Act);
-
-  shift_page_left_Act = new QAction("<", this);
-  shift_page_left_Act->setShortcut(QKeySequence::MoveToPreviousChar);
-  connect(shift_page_left_Act, SIGNAL(triggered()), this, SLOT(shift_page_left()));
-  menubar->addAction(shift_page_left_Act);
-
-  playback_realtime_Act = new QAction("[play]", this);
-  connect(playback_realtime_Act, SIGNAL(triggered()), this, SLOT(playback_realtime()));
-  menubar->addAction(playback_realtime_Act);
-
-  shift_page_right_Act = new QAction(">", this);
-  shift_page_right_Act->setShortcut(QKeySequence::MoveToNextChar);
-  connect(shift_page_right_Act, SIGNAL(triggered()), this, SLOT(shift_page_right()));
-  menubar->addAction(shift_page_right_Act);
-
-  next_page_Act = new QAction(">>", this);
-  next_page_Act->setShortcut(QKeySequence::MoveToNextPage);
-  connect(next_page_Act, SIGNAL(triggered()), this, SLOT(next_page()));
-  menubar->addAction(next_page_Act);
-
-  shift_page_up_Act = new QAction("^", this);
-  shift_page_up_Act->setShortcut(QKeySequence::MoveToPreviousLine);
-  connect(shift_page_up_Act, SIGNAL(triggered()), this, SLOT(shift_page_up()));
-  menubar->addAction(shift_page_up_Act);
-
-  shift_page_down_Act = new QAction("v", this);
-  shift_page_down_Act->setShortcut(QKeySequence::MoveToNextLine);
-  connect(shift_page_down_Act, SIGNAL(triggered()), this, SLOT(shift_page_down()));
-  menubar->addAction(shift_page_down_Act);
-
-  zoomback_Act = new QAction("zoomback", this);
-  zoomback_Act->setShortcut(Qt::Key_Backspace);
-  connect(zoomback_Act, SIGNAL(triggered()), this, SLOT(zoomback()));
-  menubar->addAction(zoomback_Act);
-
-  zoomforward_Act = new QAction("zoomforward", this);
-  zoomforward_Act->setShortcut(Qt::Key_Insert);
-  connect(zoomforward_Act, SIGNAL(triggered()), this, SLOT(forward()));
-  menubar->addAction(zoomforward_Act);
+  settingsmenu = new QMenu(this);
+  settingsmenu->setTitle("S&ettings");
+  settingsmenu->addAction("Options", this, SLOT(show_options_dialog()));
+  menubar->addMenu(settingsmenu);
 
   no_timesync_act = new QAction("no timelock", this);
   no_timesync_act->setCheckable(true);
@@ -820,6 +779,62 @@ UI_Mainwindow::UI_Mainwindow()
   helpmenu->addAction("Show splashscreen", this, SLOT(show_splashscreen()));
   menubar->addMenu(helpmenu);
 
+  navtoolbar = new QToolBar("Navigation Bar");
+  navtoolbar->setFloatable(false);
+  navtoolbar->setAllowedAreas(Qt::TopToolBarArea | Qt::BottomToolBarArea);
+  addToolBar(Qt::TopToolBarArea, navtoolbar);
+  navtoolbar->setEnabled(true);
+
+  former_page_Act = new QAction(QIcon(":/images/go-first-symbolic.symbolic.png"), "<<", this);
+  former_page_Act->setToolTip("Former Page");
+  former_page_Act->setShortcut(QKeySequence::MoveToPreviousPage);
+  connect(former_page_Act, SIGNAL(triggered()), this, SLOT(former_page()));
+  navtoolbar->addAction(former_page_Act);
+
+  shift_page_left_Act = new QAction(QIcon(":/images/go-next-symbolic-rtl.symbolic.png"), "<", this);
+  shift_page_left_Act->setToolTip("Shift Left");
+  shift_page_left_Act->setShortcut(QKeySequence::MoveToPreviousChar);
+  connect(shift_page_left_Act, SIGNAL(triggered()), this, SLOT(shift_page_left()));
+  navtoolbar->addAction(shift_page_left_Act);
+
+  playback_realtime_Act = new QAction(QIcon(":/images/media-playback-start-symbolic.symbolic.png"), "[play]", this);
+  connect(playback_realtime_Act, SIGNAL(triggered()), this, SLOT(playback_realtime()));
+  navtoolbar->addAction(playback_realtime_Act);
+
+  shift_page_right_Act = new QAction(QIcon(":/images/go-next-symbolic.symbolic.png"), ">", this);
+  shift_page_right_Act->setToolTip("Shift Right");
+  shift_page_right_Act->setShortcut(QKeySequence::MoveToNextChar);
+  connect(shift_page_right_Act, SIGNAL(triggered()), this, SLOT(shift_page_right()));
+  navtoolbar->addAction(shift_page_right_Act);
+
+  next_page_Act = new QAction(QIcon(":/images/go-first-symbolic-rtl.symbolic.png"), ">>", this);
+  next_page_Act->setToolTip("Next Page");
+  next_page_Act->setShortcut(QKeySequence::MoveToNextPage);
+  connect(next_page_Act, SIGNAL(triggered()), this, SLOT(next_page()));
+  navtoolbar->addAction(next_page_Act);
+
+  shift_page_up_Act = new QAction(QIcon(":/images/go-up-symbolic.symbolic.png"), "^", this);
+  shift_page_up_Act->setToolTip("Shift Up");
+  shift_page_up_Act->setShortcut(QKeySequence::MoveToPreviousLine);
+  connect(shift_page_up_Act, SIGNAL(triggered()), this, SLOT(shift_page_up()));
+  navtoolbar->addAction(shift_page_up_Act);
+
+  shift_page_down_Act = new QAction(QIcon(":/images/go-down-symbolic.symbolic.png"), "v", this);
+  shift_page_down_Act->setToolTip("Shift Down");
+  shift_page_down_Act->setShortcut(QKeySequence::MoveToNextLine);
+  connect(shift_page_down_Act, SIGNAL(triggered()), this, SLOT(shift_page_down()));
+  navtoolbar->addAction(shift_page_down_Act);
+
+  zoomback_Act = new QAction(QIcon(":/images/zoom-out-symbolic.symbolic.png"), "Zoom Out", this);
+  zoomback_Act->setShortcut(Qt::Key_Backspace);
+  connect(zoomback_Act, SIGNAL(triggered()), this, SLOT(zoomback()));
+  navtoolbar->addAction(zoomback_Act);
+
+  zoomforward_Act = new QAction(QIcon(":/images/zoom-in-symbolic.symbolic.png"), "Zoom In", this);
+  zoomforward_Act->setShortcut(Qt::Key_Insert);
+  connect(zoomforward_Act, SIGNAL(triggered()), this, SLOT(forward()));
+  navtoolbar->addAction(zoomforward_Act);
+
   Escape_act = new QAction(this);
   Escape_act->setShortcut(Qt::Key_Escape);
   connect(Escape_act, SIGNAL(triggered()), this, SLOT(Escape_fun()));
@@ -838,7 +853,7 @@ UI_Mainwindow::UI_Mainwindow()
   connect(video_stop_act, SIGNAL(triggered()), this, SLOT(start_stop_video()));
   video_stop_act->setToolTip("Stop video");
 
-  slidertoolbar = new QToolBar();
+  slidertoolbar = new QToolBar("Video Playback");
   slidertoolbar->setFloatable(false);
   slidertoolbar->setAllowedAreas(Qt::TopToolBarArea | Qt::BottomToolBarArea);
 #ifdef Q_OS_LINUX
@@ -1037,6 +1052,16 @@ UI_Mainwindow::UI_Mainwindow()
     messagewindow.exec();
   }
 
+  if(edflib_version() != 113)
+  {
+    QMessageBox messagewindow(QMessageBox::Critical, "Error", "There's a version problem with EDFlib.\n"
+                                                              "Can not continue.");
+    messagewindow.exec();
+
+    menubar->setEnabled(false);
+    navtoolbar->setEnabled(false);
+  }
+
   pixmap = new QPixmap(":/images/splash.png");
   splash = new QSplashScreen(this, *pixmap, Qt::WindowStaysOnTopHint);
 
diff --git a/manscan2edf.cpp b/manscan2edf.cpp
index 0faf983..7b60822 100644
--- a/manscan2edf.cpp
+++ b/manscan2edf.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/manscan2edf.h b/manscan2edf.h
index 913b834..fcb6137 100644
--- a/manscan2edf.h
+++ b/manscan2edf.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/mit2edf.cpp b/mit2edf.cpp
index 2d94d04..3ee5aa8 100644
--- a/mit2edf.cpp
+++ b/mit2edf.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/mit2edf.h b/mit2edf.h
index 23a76aa..90f4a85 100644
--- a/mit2edf.h
+++ b/mit2edf.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/nexfin2edf.cpp b/nexfin2edf.cpp
index 8dbd092..acc9ee9 100644
--- a/nexfin2edf.cpp
+++ b/nexfin2edf.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/nexfin2edf.h b/nexfin2edf.h
index b4e8823..06a6313 100644
--- a/nexfin2edf.h
+++ b/nexfin2edf.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/nk2edf.cpp b/nk2edf.cpp
index 93896c3..1a92d9a 100644
--- a/nk2edf.cpp
+++ b/nk2edf.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/nk2edf.h b/nk2edf.h
index d1cb9b8..660f756 100644
--- a/nk2edf.h
+++ b/nk2edf.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/options_dialog.cpp b/options_dialog.cpp
index a01730b..b3d35f5 100644
--- a/options_dialog.cpp
+++ b/options_dialog.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/options_dialog.h b/options_dialog.h
index 827e400..d723ddf 100644
--- a/options_dialog.h
+++ b/options_dialog.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/pagetime_dialog.cpp b/pagetime_dialog.cpp
index d09c5ea..e676b38 100644
--- a/pagetime_dialog.cpp
+++ b/pagetime_dialog.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/pagetime_dialog.h b/pagetime_dialog.h
index d9f0aef..8064044 100644
--- a/pagetime_dialog.h
+++ b/pagetime_dialog.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/plif_ecg_subtract_filter.c b/plif_ecg_subtract_filter.c
index 98ca4d5..286cf48 100644
--- a/plif_ecg_subtract_filter.c
+++ b/plif_ecg_subtract_filter.c
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2017 Teunis van Beelen
+* Copyright (C) 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/plif_ecg_subtract_filter.h b/plif_ecg_subtract_filter.h
index 36258ce..ed2745f 100644
--- a/plif_ecg_subtract_filter.h
+++ b/plif_ecg_subtract_filter.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2017 Teunis van Beelen
+* Copyright (C) 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/plif_ecg_subtract_filter_dialog.cpp b/plif_ecg_subtract_filter_dialog.cpp
index 1492fb0..ce59b25 100644
--- a/plif_ecg_subtract_filter_dialog.cpp
+++ b/plif_ecg_subtract_filter_dialog.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2017 Teunis van Beelen
+* Copyright (C) 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/plif_ecg_subtract_filter_dialog.h b/plif_ecg_subtract_filter_dialog.h
index 0a86045..69d4a7a 100644
--- a/plif_ecg_subtract_filter_dialog.h
+++ b/plif_ecg_subtract_filter_dialog.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2017 Teunis van Beelen
+* Copyright (C) 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/popup_save_cancelwindow.cpp b/popup_save_cancelwindow.cpp
index 7ffc428..52c669f 100644
--- a/popup_save_cancelwindow.cpp
+++ b/popup_save_cancelwindow.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/popup_save_cancelwindow.h b/popup_save_cancelwindow.h
index 4c2e64e..f8dbaa1 100644
--- a/popup_save_cancelwindow.h
+++ b/popup_save_cancelwindow.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/print_to_bdf.cpp b/print_to_bdf.cpp
index cd132c5..65e548c 100644
--- a/print_to_bdf.cpp
+++ b/print_to_bdf.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/print_to_bdf.h b/print_to_bdf.h
index 288ec5b..c29e28b 100644
--- a/print_to_bdf.h
+++ b/print_to_bdf.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/print_to_edf.cpp b/print_to_edf.cpp
index ce2d8c2..fa8d44d 100644
--- a/print_to_edf.cpp
+++ b/print_to_edf.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/print_to_edf.h b/print_to_edf.h
index 3d4aba5..464cc46 100644
--- a/print_to_edf.h
+++ b/print_to_edf.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/ravg_filter.cpp b/ravg_filter.cpp
index a251573..2953c9b 100644
--- a/ravg_filter.cpp
+++ b/ravg_filter.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/ravg_filter.h b/ravg_filter.h
index d6e658c..7e7139f 100644
--- a/ravg_filter.h
+++ b/ravg_filter.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/raw2edf.cpp b/raw2edf.cpp
index 3b9fc79..565cfb4 100644
--- a/raw2edf.cpp
+++ b/raw2edf.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
@@ -895,8 +895,8 @@ void UI_RAW2EDFapp::loadbuttonpressed()
     }
 
     strncpy(raw2edf_var->phys_dim, result, 16);
-    raw2edf_var->phys_dim[15] = 0;
     latin1_to_ascii(raw2edf_var->phys_dim, 16);
+    raw2edf_var->phys_dim[15] = 0;
     remove_leading_spaces(raw2edf_var->phys_dim);
     remove_trailing_spaces(raw2edf_var->phys_dim);
 
diff --git a/raw2edf.h b/raw2edf.h
index 0528af8..cf743dc 100644
--- a/raw2edf.h
+++ b/raw2edf.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/read_write_settings.cpp b/read_write_settings.cpp
index e514ba0..fc7a4e8 100644
--- a/read_write_settings.cpp
+++ b/read_write_settings.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
@@ -1613,8 +1613,8 @@ void UI_Mainwindow::read_general_settings()
       }
 
       strncpy(raw2edf_var.phys_dim, result, 16);
-      raw2edf_var.phys_dim[15] = 0;
       latin1_to_ascii(raw2edf_var.phys_dim, 16);
+      raw2edf_var.phys_dim[15] = 0;
       remove_leading_spaces(raw2edf_var.phys_dim);
       remove_trailing_spaces(raw2edf_var.phys_dim);
 
diff --git a/reduce_signals.cpp b/reduce_signals.cpp
index e040c10..40ff1f3 100644
--- a/reduce_signals.cpp
+++ b/reduce_signals.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/reduce_signals.h b/reduce_signals.h
index 4eecc8f..4115726 100644
--- a/reduce_signals.h
+++ b/reduce_signals.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/save_annots.cpp b/save_annots.cpp
index 22f0d31..c66c48f 100644
--- a/save_annots.cpp
+++ b/save_annots.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/save_annots.h b/save_annots.h
index 8416446..f86f5c6 100644
--- a/save_annots.h
+++ b/save_annots.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/save_montage_dialog.cpp b/save_montage_dialog.cpp
index 48f9bab..3ad5b42 100644
--- a/save_montage_dialog.cpp
+++ b/save_montage_dialog.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/save_montage_dialog.h b/save_montage_dialog.h
index 87165eb..8eb53c5 100644
--- a/save_montage_dialog.h
+++ b/save_montage_dialog.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/scp_ecg2edf.cpp b/scp_ecg2edf.cpp
index ad19da8..4fc86cb 100644
--- a/scp_ecg2edf.cpp
+++ b/scp_ecg2edf.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
@@ -107,6 +107,8 @@ void UI_SCPECG2EDFwindow::SelectFileButton()
   {
     qrs_data.ref_beat[i] = NULL;
 
+    buf[i] = NULL;
+
     buf2[i] = NULL;
   }
 
@@ -1166,6 +1168,7 @@ EXIT_5:
   if(hdl >= 0)
   {
     edfclose_file(hdl);
+    hdl = -1;
   }
 
 EXIT_4:
@@ -1175,14 +1178,13 @@ EXIT_4:
     if(buf[i] != NULL)
     {
       free(buf[i]);
+      buf[i] = NULL;
     }
 
-    if(scp_ecg.bimodal)
+    if(buf2[i] != NULL)
     {
-      if(buf2[i] != NULL)
-      {
-        free(buf2[i]);
-      }
+      free(buf2[i]);
+      buf2[i] = NULL;
     }
   }
 
@@ -1191,6 +1193,7 @@ EXIT_3:
   if(block != NULL)
   {
     free(block);
+    block = NULL;
   }
 
 EXIT_2:
@@ -1198,6 +1201,7 @@ EXIT_2:
   if(inputfile != NULL)
   {
     fclose(inputfile);
+    inputfile = NULL;
   }
 
 EXIT_1:
@@ -1207,6 +1211,7 @@ EXIT_1:
     if(qrs_data.ref_beat[i] != NULL)
     {
       free(qrs_data.ref_beat[i]);
+      qrs_data.ref_beat[i] = NULL;
     }
   }
 
@@ -1615,8 +1620,8 @@ int UI_SCPECG2EDFwindow::get_patient_data(FILE *inputfile)
         if(i < 1500)
         {
           strncpy(pat_dat.device_serial, str + i + 1, 48);
-          pat_dat.device_serial[48] = 0;
           latin1_to_ascii(pat_dat.device_serial, 48);
+          pat_dat.device_serial[48] = 0;
           remove_trailing_spaces(pat_dat.device_serial);
           remove_leading_spaces(pat_dat.device_serial);
         }
@@ -1632,8 +1637,8 @@ int UI_SCPECG2EDFwindow::get_patient_data(FILE *inputfile)
             if(j == 1)
             {
               strncpy(pat_dat.device_ident, str + i + 1, 48);
-              pat_dat.device_ident[48] = 0;
               latin1_to_ascii(pat_dat.device_ident, 48);
+              pat_dat.device_ident[48] = 0;
               remove_trailing_spaces(pat_dat.device_ident);
               remove_leading_spaces(pat_dat.device_ident);
             }
@@ -1641,8 +1646,8 @@ int UI_SCPECG2EDFwindow::get_patient_data(FILE *inputfile)
             if(j == 3)
             {
               strncpy(pat_dat.manufacturer, str + i + 1, 48);
-              pat_dat.manufacturer[48] = 0;
               latin1_to_ascii(pat_dat.manufacturer, 48);
+              pat_dat.manufacturer[48] = 0;
               remove_trailing_spaces(pat_dat.manufacturer);
               remove_leading_spaces(pat_dat.manufacturer);
 
diff --git a/scp_ecg2edf.h b/scp_ecg2edf.h
index 79993c5..1941f7e 100644
--- a/scp_ecg2edf.h
+++ b/scp_ecg2edf.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/show_actual_montage_dialog.cpp b/show_actual_montage_dialog.cpp
index 9357dbc..8134668 100644
--- a/show_actual_montage_dialog.cpp
+++ b/show_actual_montage_dialog.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/show_actual_montage_dialog.h b/show_actual_montage_dialog.h
index a8b7763..1461495 100644
--- a/show_actual_montage_dialog.h
+++ b/show_actual_montage_dialog.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/show_edf_hdr.cpp b/show_edf_hdr.cpp
index 4bdac66..59c1cee 100644
--- a/show_edf_hdr.cpp
+++ b/show_edf_hdr.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/show_edf_hdr.h b/show_edf_hdr.h
index 57dba79..620fe41 100644
--- a/show_edf_hdr.h
+++ b/show_edf_hdr.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/signal_chooser.cpp b/signal_chooser.cpp
index 1878477..3d6c8c5 100644
--- a/signal_chooser.cpp
+++ b/signal_chooser.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/signal_chooser.h b/signal_chooser.h
index b2b2fce..93c12ba 100644
--- a/signal_chooser.h
+++ b/signal_chooser.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/signalcurve.cpp b/signalcurve.cpp
index d2babaa..3be8d76 100644
--- a/signalcurve.cpp
+++ b/signalcurve.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/signalcurve.h b/signalcurve.h
index 1243b87..4a2ab61 100644
--- a/signalcurve.h
+++ b/signalcurve.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/signals_dialog.cpp b/signals_dialog.cpp
index 593a343..8ba4430 100644
--- a/signals_dialog.cpp
+++ b/signals_dialog.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/signals_dialog.h b/signals_dialog.h
index 08e6303..cbab5b3 100644
--- a/signals_dialog.h
+++ b/signals_dialog.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/special_button.cpp b/special_button.cpp
index e3708ee..163d732 100644
--- a/special_button.cpp
+++ b/special_button.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/special_button.h b/special_button.h
index 0283bf8..a0e6081 100644
--- a/special_button.h
+++ b/special_button.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/spectrum_dock.cpp b/spectrum_dock.cpp
index de47c47..bec24ae 100644
--- a/spectrum_dock.cpp
+++ b/spectrum_dock.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
@@ -37,7 +37,7 @@
 
 UI_SpectrumDockWindow::UI_SpectrumDockWindow(QWidget *w_parent)
 {
-  char str[600];
+  char str[1024];
 
   buf1 = NULL;
   buf2 = NULL;
@@ -55,6 +55,8 @@ UI_SpectrumDockWindow::UI_SpectrumDockWindow(QWidget *w_parent)
 
   set_settings = 0;
 
+  physdimension[0] = 0;
+
   mainwindow = (UI_Mainwindow *)w_parent;
 
   spectrum_color = mainwindow->spectrum_colorbar;
@@ -260,17 +262,29 @@ UI_SpectrumDockWindow::UI_SpectrumDockWindow(QWidget *w_parent)
   t1->setTimerType(Qt::PreciseTimer);
 #endif
 
-  QObject::connect(t1,              SIGNAL(timeout()),              this, SLOT(update_curve()));
-  QObject::connect(amplitudeSlider, SIGNAL(valueChanged(int)),      this, SLOT(sliderMoved(int)));
-  QObject::connect(log_minslider,   SIGNAL(valueChanged(int)),      this, SLOT(sliderMoved(int)));
-  QObject::connect(spanSlider,      SIGNAL(valueChanged(int)),      this, SLOT(sliderMoved(int)));
-  QObject::connect(centerSlider,    SIGNAL(valueChanged(int)),      this, SLOT(sliderMoved(int)));
-  QObject::connect(sqrtButton,      SIGNAL(toggled(bool)),          this, SLOT(sqrtButtonClicked(bool)));
-  QObject::connect(vlogButton,      SIGNAL(toggled(bool)),          this, SLOT(vlogButtonClicked(bool)));
-  QObject::connect(colorBarButton,  SIGNAL(toggled(bool)),          this, SLOT(colorBarButtonClicked(bool)));
-  QObject::connect(curve1,          SIGNAL(extra_button_clicked()), this, SLOT(print_to_txt()));
-  QObject::connect(curve1,          SIGNAL(dashBoardClicked()),     this, SLOT(setdashboard()));
-  QObject::connect(flywheel1,       SIGNAL(dialMoved(int)),         this, SLOT(update_flywheel(int)));
+  QObject::connect(t1,              SIGNAL(timeout()),               this, SLOT(update_curve()));
+  QObject::connect(amplitudeSlider, SIGNAL(valueChanged(int)),       this, SLOT(sliderMoved(int)));
+  QObject::connect(log_minslider,   SIGNAL(valueChanged(int)),       this, SLOT(sliderMoved(int)));
+  QObject::connect(spanSlider,      SIGNAL(valueChanged(int)),       this, SLOT(sliderMoved(int)));
+  QObject::connect(centerSlider,    SIGNAL(valueChanged(int)),       this, SLOT(sliderMoved(int)));
+  QObject::connect(sqrtButton,      SIGNAL(toggled(bool)),           this, SLOT(sqrtButtonClicked(bool)));
+  QObject::connect(vlogButton,      SIGNAL(toggled(bool)),           this, SLOT(vlogButtonClicked(bool)));
+  QObject::connect(colorBarButton,  SIGNAL(toggled(bool)),           this, SLOT(colorBarButtonClicked(bool)));
+  QObject::connect(curve1,          SIGNAL(extra_button_clicked()),  this, SLOT(print_to_txt()));
+  QObject::connect(curve1,          SIGNAL(dashBoardClicked()),      this, SLOT(setdashboard()));
+  QObject::connect(flywheel1,       SIGNAL(dialMoved(int)),          this, SLOT(update_flywheel(int)));
+  QObject::connect(dock,            SIGNAL(visibilityChanged(bool)), this, SLOT(open_close_dock(bool)));
+}
+
+
+void UI_SpectrumDockWindow::open_close_dock(bool)
+{
+  if(mainwindow->files_open != 1 || signal_nr < 0)
+  {
+    dock->hide();
+
+    return;
+  }
 }
 
 
@@ -1404,21 +1418,25 @@ UI_SpectrumDockWindow::~UI_SpectrumDockWindow()
   if(buf2 != NULL)
   {
     free(buf2);
+    buf2 = NULL;
   }
 
   if(buf3 != NULL)
   {
     free(buf3);
+    buf3 = NULL;
   }
 
   if(buf4 != NULL)
   {
     free(buf4);
+    buf4 = NULL;
   }
 
   if(buf5 != NULL)
   {
     free(buf5);
+    buf5 = NULL;
   }
 
   delete SpectrumDialog;
diff --git a/spectrum_dock.h b/spectrum_dock.h
index 37aa11a..792c9ae 100644
--- a/spectrum_dock.h
+++ b/spectrum_dock.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
@@ -193,6 +193,7 @@ void print_to_txt();
 void setdashboard();
 void update_flywheel(int);
 
+void open_close_dock(bool);
 };
 
 
diff --git a/spectrumanalyzer.cpp b/spectrumanalyzer.cpp
index 2bb2d6b..eeb6bef 100644
--- a/spectrumanalyzer.cpp
+++ b/spectrumanalyzer.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/spectrumanalyzer.h b/spectrumanalyzer.h
index bddd996..50d7204 100644
--- a/spectrumanalyzer.h
+++ b/spectrumanalyzer.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/spike_filter.cpp b/spike_filter.cpp
index b65400e..c98e957 100644
--- a/spike_filter.cpp
+++ b/spike_filter.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/spike_filter.h b/spike_filter.h
index 9e47b83..d1fa621 100644
--- a/spike_filter.h
+++ b/spike_filter.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/spike_filter_dialog.cpp b/spike_filter_dialog.cpp
index 1d5ac8e..dd7fad5 100644
--- a/spike_filter_dialog.cpp
+++ b/spike_filter_dialog.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/spike_filter_dialog.h b/spike_filter_dialog.h
index f38b192..47f4a6f 100644
--- a/spike_filter_dialog.h
+++ b/spike_filter_dialog.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/statistics_dialog.cpp b/statistics_dialog.cpp
index 4b8f473..375874c 100644
--- a/statistics_dialog.cpp
+++ b/statistics_dialog.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
@@ -252,9 +252,19 @@ UI_StatisticWindow::UI_StatisticWindow(struct signalcompblock *signalcomp,
 
     if(job_src == STAT_JOB_SRC_ANNOT)
     {
+      QProgressDialog progress("Processing...", "Abort", 0, 1);
+      progress.setWindowModality(Qt::WindowModal);
+      progress.setMinimumDuration(200);
+      progress.reset();
+
+      progress.setRange(0, edfplus_annotation_size(annot_list));
+      progress.setValue(0);
+
+      int p_i=0, p_j=0;
+
       for(i=0, beat_cnt=0; beat_cnt<BEAT_IVAL_SIZE; i++)
       {
-        tmp_annot = edfplus_annotation_get_item_visible_only(annot_list, i);
+        tmp_annot = edfplus_annotation_get_item_visible_only_cached(annot_list, i, &p_i, &p_j);
 
         if(tmp_annot == NULL)  break;
 
@@ -269,9 +279,23 @@ UI_StatisticWindow::UI_StatisticWindow(struct signalcompblock *signalcomp,
 
           beat_cnt++;
         }
+
+        if(!(i%1000))
+        {
+          progress.setValue(i);
+
+          qApp->processEvents();
+
+          if(progress.wasCanceled() == true)
+          {
+            break;
+          }
+        }
       }
 
       if(beat_cnt)  beat_cnt--;
+
+      progress.reset();
     }
 
     if(beat_cnt < 3)
diff --git a/statistics_dialog.h b/statistics_dialog.h
index d03c667..fa61a30 100644
--- a/statistics_dialog.h
+++ b/statistics_dialog.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
@@ -43,6 +43,7 @@
 #include <QHBoxLayout>
 #include <QVBoxLayout>
 #include <QSlider>
+#include <QProgressDialog>
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/unisens2edf.cpp b/unisens2edf.cpp
index 1862756..771e51a 100644
--- a/unisens2edf.cpp
+++ b/unisens2edf.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/unisens2edf.h b/unisens2edf.h
index 0bdebef..a58da1c 100644
--- a/unisens2edf.h
+++ b/unisens2edf.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/utc_date_time.c b/utc_date_time.c
index efb6ef7..3c845e9 100644
--- a/utc_date_time.c
+++ b/utc_date_time.c
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/utc_date_time.h b/utc_date_time.h
index d27ff63..7031c29 100644
--- a/utc_date_time.h
+++ b/utc_date_time.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/utils.c b/utils.c
index 6532ff3..ddb1d51 100644
--- a/utils.c
+++ b/utils.c
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
@@ -72,14 +72,14 @@ int get_filename_from_path(char *dest, const char *src, int size)
 
   if(size<1)
   {
-    return(-1);
+    return -1;
   }
 
   if(size<2)
   {
     dest[0] = 0;
 
-    return(0);
+    return 0;
   }
 
   len = strlen(src);
@@ -88,7 +88,7 @@ int get_filename_from_path(char *dest, const char *src, int size)
   {
     dest[0] = 0;
 
-    return(0);
+    return 0;
   }
 
   for(i=len-1; i>=0; i--)
@@ -101,11 +101,18 @@ int get_filename_from_path(char *dest, const char *src, int size)
 
   i++;
 
+  if(i == len)
+  {
+    dest[0] = 0;
+
+    return 0;
+  }
+
   strncpy(dest, src + i, size);
 
   dest[size-1] = 0;
 
-  return(strlen(dest));
+  return strlen(dest);
 }
 
 
@@ -117,14 +124,14 @@ int get_directory_from_path(char *dest, const char *src, int size)
 
   if(size<1)
   {
-    return(-1);
+    return -1;
   }
 
   if(size<2)
   {
     dest[0] = 0;
 
-    return(0);
+    return 0;
   }
 
   len = strlen(src);
@@ -133,7 +140,7 @@ int get_directory_from_path(char *dest, const char *src, int size)
   {
     dest[0] = 0;
 
-    return(0);
+    return 0;
   }
 
   for(i=len-1; i>=0; i--)
@@ -155,7 +162,7 @@ int get_directory_from_path(char *dest, const char *src, int size)
     dest[size-1] = 0;
   }
 
-  return(strlen(dest));
+  return strlen(dest);
 }
 
 
@@ -198,7 +205,7 @@ void remove_trailing_spaces(char *str)
 
   len = strlen(str);
 
-  for(i=(len-1); i>-1; i--)
+  for(i=(len-1); i>=0; i--)
   {
     if(str[i]!=' ')  break;
   }
@@ -674,13 +681,15 @@ void latin1_to_ascii(char *str, int len)
 
 int antoi(const char *input_str, int len)
 {
-  char str[1024];
+  char str[4096];
+
+  if(len > 4095)  len = 4095;
 
   strncpy(str, input_str, len);
 
   str[len] = 0;
 
-  return(atoi_nonlocalized(str));
+  return atoi_nonlocalized(str);
 }
 
 
@@ -750,7 +759,7 @@ int fprint_int_number_nonlocalized(FILE *file, int q, int minimum, int sign)
     j++;
   }
 
-  return(j);
+  return j;
 }
 
 
@@ -822,7 +831,7 @@ int fprint_ll_number_nonlocalized(FILE *file, long long q, int minimum, int sign
     j++;
   }
 
-  return(j);
+  return j;
 }
 
 
@@ -886,7 +895,7 @@ int sprint_int_number_nonlocalized(char *str, int q, int minimum, int sign)
 
   str[j] = 0;
 
-  return(j);
+  return j;
 }
 
 
@@ -952,7 +961,7 @@ int sprint_ll_number_nonlocalized(char *str, long long q, int minimum, int sign)
 
   str[j] = 0;
 
-  return(j);
+  return j;
 }
 
 
@@ -1012,7 +1021,7 @@ int sprint_number_nonlocalized(char *str, double nr)
   {
     str[j] = 0;
 
-    return(j);
+    return j;
   }
 
   str[j++] = '.';
@@ -1046,7 +1055,7 @@ int sprint_number_nonlocalized(char *str, double nr)
     }
   }
 
-  return(j);
+  return j;
 }
 
 
@@ -1121,7 +1130,7 @@ double atof_nonlocalized(const char *str)
     value2 /= i;
   }
 
-  return(value + value2);
+  return value + value2;
 }
 
 
@@ -1161,7 +1170,7 @@ int atoi_nonlocalized(const char *str)
     value += (str[i] - '0');
   }
 
-  return(value * sign);
+  return value * sign;
 }
 
 
@@ -1204,11 +1213,11 @@ long long atoll_x(const char *str, int dimension)
     {
       if(negative)
       {
-        return(value * dimension * -1LL);
+        return value * dimension * -1LL;
       }
       else
       {
-        return(value * dimension);
+        return value * dimension;
       }
     }
 
@@ -1235,11 +1244,11 @@ long long atoll_x(const char *str, int dimension)
 
   if(negative)
   {
-    return(value * (dimension / radix) * -1LL);
+    return value * (dimension / radix) * -1LL;
   }
   else
   {
-    return(value * (dimension / radix));
+    return value * (dimension / radix);
   }
 }
 
@@ -1251,7 +1260,7 @@ int is_integer_number(char *str)
 
   l = strlen(str);
 
-  if(!l)  return(1);
+  if(!l)  return 1;
 
   if((str[0]=='+')||(str[0]=='-'))
   {
@@ -1265,7 +1274,7 @@ int is_integer_number(char *str)
     {
       if(!digit)
       {
-        return(1);
+        return 1;
       }
       hasspace++;
     }
@@ -1273,21 +1282,21 @@ int is_integer_number(char *str)
     {
       if((str[i]<48)||(str[i]>57))
       {
-        return(1);
+        return 1;
       }
       else
       {
         if(hasspace)
         {
-          return(1);
+          return 1;
         }
         digit++;
       }
     }
   }
 
-  if(digit)  return(0);
-  else  return(1);
+  if(digit)  return 0;
+  else  return 1;
 }
 
 
@@ -1296,11 +1305,11 @@ int is_integer_number(char *str)
 
 int is_number(char *str)
 {
-  int i=0, l, hasspace = 0, hassign=0, digit=0, hasdot=0, hasexp=0;
+  int i=0, len, hasspace=0, hassign=0, digit=0, hasdot=0, hasexp=0;
 
-  l = strlen(str);
+  len = strlen(str);
 
-  if(!l)  return(1);
+  if(!len)  return 1;
 
   if((str[0]=='+')||(str[0]=='-'))
   {
@@ -1308,13 +1317,13 @@ int is_number(char *str)
     i++;
   }
 
-  for(; i<l; i++)
+  for(; i<len; i++)
   {
     if((str[i]=='e')||(str[i]=='E'))
     {
       if((!digit)||hasexp)
       {
-        return(1);
+        return 1;
       }
       hasexp++;
       hassign = 0;
@@ -1327,7 +1336,7 @@ int is_number(char *str)
     {
       if(!digit)
       {
-        return(1);
+        return 1;
       }
       hasspace++;
     }
@@ -1335,17 +1344,17 @@ int is_number(char *str)
     {
       if(((str[i]<48)||(str[i]>57))&&str[i]!='.')
       {
-        return(1);
+        return 1;
       }
       else
       {
         if(hasspace)
         {
-          return(1);
+          return 1;
         }
         if(str[i]=='.')
         {
-          if(hasdot)  return(1);
+          if(hasdot)  return 1;
           hasdot++;
         }
         else
@@ -1358,9 +1367,9 @@ int is_number(char *str)
 
   if(hasexp)
   {
-    if(++i==l)
+    if(++i==len)
     {
-      return(1);
+      return 1;
     }
 
     if((str[i]=='+')||(str[i]=='-'))
@@ -1369,13 +1378,13 @@ int is_number(char *str)
       i++;
     }
 
-    for(; i<l; i++)
+    for(; i<len; i++)
     {
       if(str[i]==' ')
       {
         if(!digit)
         {
-          return(1);
+          return 1;
         }
         hasspace++;
       }
@@ -1383,13 +1392,13 @@ int is_number(char *str)
       {
         if((str[i]<48)||(str[i]>57))
         {
-          return(1);
+          return 1;
         }
         else
         {
           if(hasspace)
           {
-            return(1);
+            return 1;
           }
 
           digit++;
@@ -1398,8 +1407,8 @@ int is_number(char *str)
     }
   }
 
-  if(digit)  return(0);
-  else  return(1);
+  if(digit)  return 0;
+  else  return 1;
 }
 
 
@@ -1418,7 +1427,7 @@ int round_125_cat(double value)
 {
   if(value < 0)  value *= -1;
 
-  if(value < 0.000001)  return(10);
+  if(value < 0.000001)  return 10;
 
   while(value > 1000)  value /=10;
 
@@ -1426,22 +1435,22 @@ int round_125_cat(double value)
 
   if(value > 670)
   {
-    return(10);
+    return 10;
   }
   else if(value > 300)
     {
-      return(50);
+      return 50;
     }
     else if(value > 135)
       {
-        return(20);
+        return 20;
       }
       else
       {
-        return(10);
+        return 10;
       }
 
-  return(10);
+  return 10;
 }
 
 
@@ -1599,6 +1608,52 @@ void hextobin(char *dest, const char *str)
 }
 
 
+double round_to_3digits(double val)
+{
+  int i, exp=0, polarity=1;
+
+  if(!dblcmp(val, 0.0))
+  {
+    return 0;
+  }
+
+  if(val < 0)
+  {
+    polarity = -1;
+
+    val *= -1;
+  }
+
+  while(val < 99.999)
+  {
+    val *= 10;
+
+    exp--;
+  }
+
+  while(val > 999.999)
+  {
+    val /= 10;
+
+    exp++;
+  }
+
+  val = nearbyint(val);
+
+  for(i=0; i<exp; i++)
+  {
+    val *= 10;
+  }
+
+  for(i=0; i>exp; i--)
+  {
+    val /= 10;
+  }
+
+  return val * polarity;
+}
+
+
 double round_up_step125(double val, double *ratio)
 {
   int i, exp=0;
diff --git a/utils.h b/utils.h
index 13a739f..3bee05f 100644
--- a/utils.h
+++ b/utils.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
@@ -92,6 +92,7 @@ int convert_to_metric_suffix(char *, double, int);
 
 double round_up_step125(double, double *);      /* Rounds the value up to 1-2-5 steps */
 double round_down_step125(double, double *);    /* Rounds the value down to 1-2-5 steps */
+double round_to_3digits(double);   /* Rounds the value to max 3 digits */
 
 int strtoipaddr(unsigned int *, const char *);  /* convert a string "192.168.1.12" to an integer */
 
diff --git a/version.txt b/version.txt
index 0ea6393..6476cb3 100644
--- a/version.txt
+++ b/version.txt
@@ -1,4 +1,19 @@
 
+ version 1.62      January 7, 2018
+ --------------
+
+ - Improve speed when processing annotations for heart rate variability.
+
+ - Update EDFlib.
+
+ - Fixed some memory leaks.
+
+ - Fixed some of-by-one out of boundary memory readings that potentially could cause a segfault.
+
+ - Bugfixes.
+
+
+
  version 1.61      November 1, 2017
  --------------
 
diff --git a/videoplayer.cpp b/videoplayer.cpp
index cf65b10..3c89032 100644
--- a/videoplayer.cpp
+++ b/videoplayer.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/view_montage_dialog.cpp b/view_montage_dialog.cpp
index 1080220..473a865 100644
--- a/view_montage_dialog.cpp
+++ b/view_montage_dialog.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/view_montage_dialog.h b/view_montage_dialog.h
index 89538a4..3c0aaaf 100644
--- a/view_montage_dialog.h
+++ b/view_montage_dialog.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/viewbuf.cpp b/viewbuf.cpp
index 4286bef..5e1f701 100644
--- a/viewbuf.cpp
+++ b/viewbuf.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/viewcurve.cpp b/viewcurve.cpp
index cc8a8e9..a1e5a08 100644
--- a/viewcurve.cpp
+++ b/viewcurve.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
@@ -1833,11 +1833,6 @@ void ViewCurve::drawCurve_stage_2(QPainter *painter, int w_width, int w_height,
     }
   }
 
-  if((viewbuf==NULL)||(graphicBuf==NULL)||(screensamples==NULL))
-  {
-    return;
-  }
-
   if(mainwindow->show_baselines)
   {
     vertical_distance = h / (signalcomps + 1);
@@ -2062,6 +2057,11 @@ void ViewCurve::drawCurve_stage_2(QPainter *painter, int w_width, int w_height,
     }
   }
 
+  if((viewbuf==NULL)||(graphicBuf==NULL)||(screensamples==NULL))
+  {
+    return;
+  }
+
   if(mainwindow->clip_to_pane)
   {
     painter->setClipping(true);
@@ -3542,10 +3542,10 @@ void ViewCurve::sidemenu_close()
   {
     strncpy(mainwindow->signalcomp[signal_nr]->alias, AliasLineEdit->text().toLatin1().data(), 16);
 
-    mainwindow->signalcomp[signal_nr]->alias[16] = 0;
-
     latin1_to_ascii(mainwindow->signalcomp[signal_nr]->alias, 16);
 
+    mainwindow->signalcomp[signal_nr]->alias[16] = 0;
+
     remove_trailing_spaces(mainwindow->signalcomp[signal_nr]->alias);
 
     remove_leading_spaces(mainwindow->signalcomp[signal_nr]->alias);
diff --git a/viewcurve.h b/viewcurve.h
index 5c574f3..d1067c3 100644
--- a/viewcurve.h
+++ b/viewcurve.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/wav2edf.cpp b/wav2edf.cpp
index 5140ed6..c956269 100644
--- a/wav2edf.cpp
+++ b/wav2edf.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/wav2edf.h b/wav2edf.h
index 5973484..7b00b25 100644
--- a/wav2edf.h
+++ b/wav2edf.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/xml.cpp b/xml.cpp
index 7adf069..964be6c 100644
--- a/xml.cpp
+++ b/xml.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/xml.h b/xml.h
index 4a418a5..94cdcec 100644
--- a/xml.h
+++ b/xml.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/z_ratio_filter.cpp b/z_ratio_filter.cpp
index 2f537e5..fbe9848 100644
--- a/z_ratio_filter.cpp
+++ b/z_ratio_filter.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/z_ratio_filter.h b/z_ratio_filter.h
index 5b74470..f5ce12a 100644
--- a/z_ratio_filter.h
+++ b/z_ratio_filter.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/z_score_dialog.cpp b/z_score_dialog.cpp
index 7b7eb25..8dfb96b 100644
--- a/z_score_dialog.cpp
+++ b/z_score_dialog.cpp
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *
diff --git a/z_score_dialog.h b/z_score_dialog.h
index 63d4a51..ed9c16e 100644
--- a/z_score_dialog.h
+++ b/z_score_dialog.h
@@ -3,7 +3,7 @@
 *
 * Author: Teunis van Beelen
 *
-* Copyright (C) 2012, 2013, 2014, 2015, 2016, 2017 Teunis van Beelen
+* Copyright (C) 2012, 2013, 2014, 2015, 2016, 2017, 2018 Teunis van Beelen
 *
 * Email: teuniz at gmail.com
 *

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/edfbrowser.git



More information about the debian-med-commit mailing list