mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Fallback on last used config path if no last skein path is set and vice versa.
This commit is contained in:
		
							parent
							
								
									b4dc299be0
								
							
						
					
					
						commit
						cec660c263
					
				
					 1 changed files with 4 additions and 3 deletions
				
			
		| 
						 | 
					@ -154,7 +154,8 @@ sub do_slice {
 | 
				
			||||||
        Slic3r::Config->validate;
 | 
					        Slic3r::Config->validate;
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        # select input file
 | 
					        # select input file
 | 
				
			||||||
        my $dialog = Wx::FileDialog->new($self, 'Choose a STL file to slice:', $last_skein_dir || "", "", $stl_wildcard, wxFD_OPEN);
 | 
					        my $dir = $last_skein_dir || $last_config_dir || "";
 | 
				
			||||||
 | 
					        my $dialog = Wx::FileDialog->new($self, 'Choose a STL file to slice:', $dir, "", $stl_wildcard, wxFD_OPEN);
 | 
				
			||||||
        return unless $dialog->ShowModal == wxID_OK;
 | 
					        return unless $dialog->ShowModal == wxID_OK;
 | 
				
			||||||
        my ($input_file) = $dialog->GetPaths;
 | 
					        my ($input_file) = $dialog->GetPaths;
 | 
				
			||||||
        my $input_file_basename = basename($input_file);
 | 
					        my $input_file_basename = basename($input_file);
 | 
				
			||||||
| 
						 | 
					@ -212,7 +213,7 @@ sub do_slice {
 | 
				
			||||||
sub save_config {
 | 
					sub save_config {
 | 
				
			||||||
    my $self = shift;
 | 
					    my $self = shift;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    my $dir = $last_config ? dirname($last_config) : $last_config_dir || "";
 | 
					    my $dir = $last_config ? dirname($last_config) : $last_config_dir || $last_skein_dir || "";
 | 
				
			||||||
    my $filename = $last_config ? basename($last_config) : "config.ini";
 | 
					    my $filename = $last_config ? basename($last_config) : "config.ini";
 | 
				
			||||||
    my $dlg = Wx::FileDialog->new($self, 'Save configuration as:', $dir, $filename, 
 | 
					    my $dlg = Wx::FileDialog->new($self, 'Save configuration as:', $dir, $filename, 
 | 
				
			||||||
        $ini_wildcard, wxFD_SAVE);
 | 
					        $ini_wildcard, wxFD_SAVE);
 | 
				
			||||||
| 
						 | 
					@ -227,7 +228,7 @@ sub save_config {
 | 
				
			||||||
sub load_config {
 | 
					sub load_config {
 | 
				
			||||||
    my $self = shift;
 | 
					    my $self = shift;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    my $dir = $last_config ? dirname($last_config) : $last_config_dir || "";
 | 
					    my $dir = $last_config ? dirname($last_config) : $last_config_dir || $last_skein_dir || "";
 | 
				
			||||||
    my $dlg = Wx::FileDialog->new($self, 'Select configuration to load:', $dir, "config.ini", 
 | 
					    my $dlg = Wx::FileDialog->new($self, 'Select configuration to load:', $dir, "config.ini", 
 | 
				
			||||||
        $ini_wildcard, wxFD_OPEN);
 | 
					        $ini_wildcard, wxFD_OPEN);
 | 
				
			||||||
    if ($dlg->ShowModal == wxID_OK) {
 | 
					    if ($dlg->ShowModal == wxID_OK) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue