From 2fe5716c5e775180eb629fe3848cfc5ee0c280aa Mon Sep 17 00:00:00 2001 From: Diane Trout Date: Sat, 29 Jul 2006 00:17:22 +0000 Subject: [PATCH] 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. --- alg/mussa.cpp | 2 ++ qui/mussa_setup_dialog/MussaSetupWidget.cpp | 2 ++ 2 files changed, 4 insertions(+) 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); -- 2.30.2