X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=mussa.git;a=blobdiff_plain;f=qui%2FMussaWindow.cpp;h=5d934fa36d637536fa33b03ccac033cdaa5c8f72;hp=883703fd3be49d8867128640dbad020699262bf5;hb=a55b0297c987f8885a255527a0599f813e3bb8dc;hpb=516c775c2bc35f526a223e3f6968cbd1f8fa3402 diff --git a/qui/MussaWindow.cpp b/qui/MussaWindow.cpp index 883703f..5d934fa 100644 --- a/qui/MussaWindow.cpp +++ b/qui/MussaWindow.cpp @@ -324,6 +324,11 @@ void MussaWindow::about() void MussaWindow::clear() { + if (motif_editor != 0) { + motif_editor->hide(); + delete motif_editor; + } + aligned_windows.clear(); browser->clear(); } @@ -459,13 +464,11 @@ bool MussaWindow::isClearingAnalysisSafe() void MussaWindow::editMotifs() { - if (motif_editor != 0) { - motif_editor->hide(); - delete motif_editor; + if (not motif_editor) { + motif_editor = new MotifEditor(analysis); + connect(motif_editor, SIGNAL(changedMotifs()), + this, SLOT(updateAnnotations())); } - motif_editor = new MotifEditor(analysis); - connect(motif_editor, SIGNAL(changedMotifs()), - this, SLOT(updateAnnotations())); motif_editor->show(); }