mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	FIX: get exported file name in preview-only mode
Change-Id: Ibea53d951e020ff03c1e7f378714b117a4e8a19f
This commit is contained in:
		
							parent
							
								
									61aa0ddada
								
							
						
					
					
						commit
						9ab6e86b47
					
				
					 2 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -979,7 +979,7 @@ bool MainFrame::preview_only_hint()
 | 
			
		|||
        });
 | 
			
		||||
        confirm_dlg.update_btn_label(_L("Yes"), _L("No"));
 | 
			
		||||
        auto filename = wxString((m_plater->get_preview_only_filename()).c_str(), wxConvUTF8);
 | 
			
		||||
        confirm_dlg.update_text(filename + _L(" needs to be closed before creating a new model. Do you want to continue?"));
 | 
			
		||||
        confirm_dlg.update_text(filename + _L(" will be closed before creating a new model. Do you want to continue?"));
 | 
			
		||||
        confirm_dlg.on_show();
 | 
			
		||||
        if (preview_only_to_editor) {
 | 
			
		||||
            m_plater->new_project();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6477,8 +6477,11 @@ void Plater::priv::set_project_filename(const wxString& filename)
 | 
			
		|||
    //BBS
 | 
			
		||||
    wxString project_name = from_u8(full_path.filename().string());
 | 
			
		||||
    set_project_name(project_name);
 | 
			
		||||
    // record filename for hint when open exported file/.gcode
 | 
			
		||||
    if (q->m_only_gcode)
 | 
			
		||||
        q->m_preview_only_filename = std::string((project_name + ".gcode").mb_str());
 | 
			
		||||
    if (q->m_exported_file)
 | 
			
		||||
        q->m_preview_only_filename = std::string((project_name + ".3mf").mb_str());
 | 
			
		||||
 | 
			
		||||
    wxGetApp().mainframe->update_title();
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -8498,9 +8501,6 @@ bool Plater::open_3mf_file(const fs::path &file_path)
 | 
			
		|||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // record filename for hint when open exported file
 | 
			
		||||
    m_preview_only_filename = filename;
 | 
			
		||||
 | 
			
		||||
    return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue