OnParametersRequest invoked via Dispatcher.

This commit is contained in:
morkt 2015-08-12 01:31:56 +04:00
parent 5bf2493044
commit 28a57db9e6

View File

@ -69,7 +69,7 @@ namespace GARbro.GUI
m_recent_files = new LinkedList<string> (Settings.Default.appRecentFiles.Cast<string>().Take (MaxRecentFiles)); m_recent_files = new LinkedList<string> (Settings.Default.appRecentFiles.Cast<string>().Take (MaxRecentFiles));
RecentFilesMenu.ItemsSource = RecentFiles; RecentFilesMenu.ItemsSource = RecentFiles;
FormatCatalog.Instance.ParametersRequest += OnParametersRequest; FormatCatalog.Instance.ParametersRequest += (s, e) => Dispatcher.Invoke (() => OnParametersRequest (s, e));
CurrentDirectory.SizeChanged += (s, e) => { CurrentDirectory.SizeChanged += (s, e) => {
if (e.WidthChanged) if (e.WidthChanged)
@ -1206,7 +1206,7 @@ namespace GARbro.GUI
private void OnParametersRequest (object sender, ParametersRequestEventArgs e) private void OnParametersRequest (object sender, ParametersRequestEventArgs e)
{ {
var format = sender as ArchiveFormat; var format = sender as IResource;
if (null != format) if (null != format)
{ {
var control = format.GetAccessWidget() as UIElement; var control = format.GetAccessWidget() as UIElement;