[med-svn] [SCM] aghermann branch, master, updated. c0bd21ca8eb529ade7e0c7aad22951a308a8dc8f

Andrei Zavada johnhommer at gmail.com
Wed May 1 00:09:48 UTC 2013


The following commit has been merged in the master branch:
commit b54694281ef70167eeae887ed87ead4d0e141e77
Author: Andrei Zavada <johnhommer at gmail.com>
Date:   Tue Apr 30 21:23:32 2013 +0300

    talk to user if no name is given to a newly marked plain annotation

diff --git a/src/ui/sf/montage_cb.cc b/src/ui/sf/montage_cb.cc
index 572a0de..bd33190 100644
--- a/src/ui/sf/montage_cb.cc
+++ b/src/ui/sf/montage_cb.cc
@@ -1112,8 +1112,6 @@ iSFPageSelectionAnnotate_activate_cb(
 	if ( GTK_RESPONSE_OK ==
 	     gtk_dialog_run( (GtkDialog*)SF.wSFAnnotationLabel) ) {
 		auto new_ann = gtk_entry_get_text( SF.eSFAnnotationLabel);
-		if ( strlen( new_ann) == 0 )
-			return;
 
 		using sigfile::SAnnotation;
 		auto type =
@@ -1125,6 +1123,11 @@ iSFPageSelectionAnnotate_activate_cb(
 			? SAnnotation::TType::eyeblink
 			: SAnnotation::TType::plain;
 
+		if ( strlen( new_ann) == 0 && type == SAnnotation::TType::plain ) {
+			aghui::pop_ok_message( SF.wSF, "Give a plain annotation a name", "and try again.");
+			return;
+		}
+
 		SF.using_channel->mark_region_as_annotation( new_ann, type);
 
 		gtk_widget_queue_draw( (GtkWidget*)SF.daSFMontage);

-- 
Sleep experiment manager



More information about the debian-med-commit mailing list