From: Diane Trout Date: Sat, 29 Jul 2006 00:17:22 +0000 (+0000) Subject: set mussa analysis name in MussaSetupWidget X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=mussa.git;a=commitdiff_plain;h=2fe5716c5e775180eb629fe3848cfc5ee0c280aa set mussa analysis name in MussaSetupWidget Without an analysis name the save code wouldn't save anything. This also throws an error message when there isn't an analysis name. And as a hack one can put a filename in the analysis name and actually have it save to that location. --- diff --git a/alg/mussa.cpp b/alg/mussa.cpp index 44f9adb..68e7324 100644 --- a/alg/mussa.cpp +++ b/alg/mussa.cpp @@ -570,6 +570,8 @@ Mussa::save() append_info << "_sp_" << i << "v" << i2; all_comps[i][i2].save(save_path/(save_name+append_info.str()+".flp")); } + } else { + throw mussa_error("Can't save analysis without an analysis name"); } } diff --git a/qui/mussa_setup_dialog/MussaSetupWidget.cpp b/qui/mussa_setup_dialog/MussaSetupWidget.cpp index 63e9845..e029b11 100644 --- a/qui/mussa_setup_dialog/MussaSetupWidget.cpp +++ b/qui/mussa_setup_dialog/MussaSetupWidget.cpp @@ -126,9 +126,11 @@ Mussa* MussaSetupWidget::getMussaObject() int win_size = windowLineEdit.text().toInt(); int threshold = thresholdLineEdit.text().toInt(); + std::string name = analysisNameLineEdit.text().toStdString(); if (win_size == 0 or threshold == 0) { throw mussa_load_error("must set analysis parameters"); } else { + mussa->set_name(name); mussa->set_window(win_size); mussa->set_threshold(threshold); mussa->set_analysis_mode(Mussa::TransitiveNway);