Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/gui/MainFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,12 @@ void MyMainFrame::DirtyVolumes( ) {
sharpen_3d_panel->volumes_are_dirty = true;
refine_ctf_panel->volumes_are_dirty = true;

if ( current_workflow == "Template Matching" ) {
match_template_panel->volumes_are_dirty = true;
// Always mark template matching panels as dirty, regardless of current workflow
// This ensures volumes are available when user switches to Template Matching workflow
match_template_panel->volumes_are_dirty = true;
#ifdef EXPERIMENTAL
refine_template_panel->volumes_are_dirty = true;
refine_template_panel->volumes_are_dirty = true;
#endif
}
}

void MyMainFrame::DirtyAtomicCoordinates( ) {
Expand All @@ -337,11 +337,11 @@ void MyMainFrame::DirtyImageGroups( ) {
findparticles_panel->group_combo_is_dirty = true;
picking_results_panel->group_combo_is_dirty = true;

if ( current_workflow == "Template Matching" ) {
match_template_panel->group_combo_is_dirty = true;
match_template_results_panel->group_combo_is_dirty = true;
refine_template_panel->group_combo_is_dirty = true;
}
// Always mark template matching panels as dirty, regardless of current workflow
// This ensures image groups are available when user switches to Template Matching workflow
match_template_panel->group_combo_is_dirty = true;
match_template_results_panel->group_combo_is_dirty = true;
refine_template_panel->group_combo_is_dirty = true;
}

void MyMainFrame::DirtyParticlePositionGroups( ) {
Expand Down
8 changes: 7 additions & 1 deletion src/gui/MatchTemplatePanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ void MatchTemplatePanel::OnUpdateUI(wxUpdateUIEvent& event) {
ReferenceSelectPanel->Enable(true);

if ( RunProfileComboBox->GetCount( ) > 0 ) {
if ( image_asset_panel->ReturnGroupSize(GroupComboBox->GetSelection( )) > 0 && run_profiles_panel->run_profile_manager.ReturnTotalJobs(RunProfileComboBox->GetSelection( )) > 0 && all_images_have_defocus_values == true ) {
if ( image_asset_panel->ReturnGroupSize(GroupComboBox->GetSelection( )) > 0 && run_profiles_panel->run_profile_manager.ReturnTotalJobs(RunProfileComboBox->GetSelection( )) > 0 && all_images_have_defocus_values == true && ReferenceSelectPanel->GetSelection( ) >= 0 ) {
StartEstimationButton->Enable(true);
}
else
Expand Down Expand Up @@ -559,6 +559,12 @@ void MatchTemplatePanel::SetInputsForPossibleReRun(bool set_up_to_resume_job, Te

void MatchTemplatePanel::StartEstimationClick(wxCommandEvent& event) {

// Safety check: ensure a volume is selected before proceeding
if ( ReferenceSelectPanel->GetSelection( ) < 0 ) {
wxMessageBox("Please select a reference volume before starting the job.", "No Reference Volume Selected", wxOK | wxICON_ERROR);
return;
}

active_group.CopyFrom(&image_asset_panel->all_groups_list->groups[GroupComboBox->GetSelection( )]);

// Check if this is a resume job. If yes, get the job id and set the active
Expand Down