Skip to content

Commit

Permalink
Stop hardcoding the height for RunLogos.
Browse files Browse the repository at this point in the history
Fixed an issue related to recent changes regarding image pathing where the OpenFileDialog would try to open an invalid file path.
  • Loading branch information
noctvrno committed Jul 10, 2022
1 parent 0db0df8 commit b8d20a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions MCROrganizer/Core/Utils/RunTemplateManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ public Collection<T> LoadData<T, U>(ICollection<U> entitiesToClearOnLoad, Boolea
{
fileBrowserDialog = new OpenFileDialog()
{
InitialDirectory = PathUtils.ImagePath,
Filter = PathUtils.MCROFilter,
DefaultExt = PathUtils.Extension,
AddExtension = true
AddExtension = true,
RestoreDirectory = true,
};

if (fileBrowserDialog.ShowDialog() != DialogResult.OK)
Expand Down
6 changes: 3 additions & 3 deletions MCROrganizer/Core/View/MCROrganizerControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
xmlns:custom="clr-namespace:MCROrganizer.Core.CustomControls"
xmlns:attached="clr-namespace:MCROrganizer.Core.Utils"
mc:Ignorable="d"
Background="Transparent"
Background="Gray"
Height="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:MainWindow}}, Path=ActualHeight}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Expand All @@ -18,10 +18,10 @@
</UserControl.Resources>
<Grid Margin="0 20 0 0">
<Grid.RowDefinitions>
<RowDefinition Height="{Binding IsCurrentRunLogoSet, Converter={StaticResource b2d}, ConverterParameter=25}" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Image Grid.Row="0" Source="{Binding RunInProgress.RunLogo}" HorizontalAlignment="Center" Width="Auto" Height="25" />
<Image Grid.Row="0" Source="{Binding RunInProgress.RunLogo}" HorizontalAlignment="Center" Width="Auto" Height="Auto" Stretch="None"/>
<ItemsControl x:Name="buttonsItemsControl" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="{Binding ItemsControlMargins}" ItemsSource="{Binding Runs}">
<ItemsControl.Style>
<Style TargetType="{x:Type ItemsControl}">
Expand Down

0 comments on commit b8d20a0

Please sign in to comment.