Skip to content

Commit bffaa3b

Browse files
committed
修复后缀名逻辑和自动添加后缀名的 bug
1 parent 2186fe6 commit bffaa3b

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

csharp/GUI/TaskListViewItem.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@
200200
<Grid>
201201
<Grid.ColumnDefinitions>
202202
<ColumnDefinition Width="40"/>
203-
<ColumnDefinition Width="1.5*"/>
204-
<ColumnDefinition Width="1*" MinWidth="90" MaxWidth="170"/>
203+
<ColumnDefinition Width="1.75*"/>
204+
<ColumnDefinition Width="1*" MinWidth="90" MaxWidth="210"/>
205205
<ColumnDefinition Width="40"/>
206206
</Grid.ColumnDefinitions>
207207
<Grid.RowDefinitions>

csharp/GUI/ViewModels.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public int SelectedOutputPluginIndex
187187
set
188188
{
189189
_selectedOutputPluginIndex = value;
190-
ExportExtension = value >= 0 ? "." + SelectedOutputPlugin.Suffix : null;
190+
ExportExtension = AutoExtension && value >= 0 ? "." + SelectedOutputPlugin.Suffix : null;
191191
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("SelectedOutputPluginIndex"));
192192
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("SelectedOutputPlugin"));
193193
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("SelectedOutputOptions"));
@@ -211,7 +211,7 @@ public string ExportExtension
211211
{
212212
foreach (var task in TaskList)
213213
{
214-
task.ExportTitle = Path.GetFileNameWithoutExtension(task.ExportTitle);
214+
task.ExportTitle = Path.GetFileNameWithoutExtension(task.ImportFilename);
215215
}
216216
}
217217
else if (_exportExtension != null && value == null)
@@ -282,10 +282,6 @@ public void PrepareForExecution()
282282
Error = null;
283283
}
284284

285-
public Plugin InputPlugin { get; set; }
286-
287-
public Plugin OutputPlugin { get; set; }
288-
289285
public string ImportFilename => Path.GetFileName(ImportPath);
290286

291287
public string ImportDirectory => Path.GetDirectoryName(ImportPath);

0 commit comments

Comments
 (0)