restore busy state after archive parameters dialog popup.

This commit is contained in:
morkt 2014-07-26 23:21:21 +04:00
parent 2446927e83
commit 39d00a86b0

View File

@ -169,10 +169,14 @@ namespace GARbro.GUI
} }
} }
private bool m_busy_state = false;
public void SetBusyState() public void SetBusyState()
{ {
m_busy_state = true;
Mouse.OverrideCursor = Cursors.Wait; Mouse.OverrideCursor = Cursors.Wait;
Dispatcher.InvokeAsync (() => { Dispatcher.InvokeAsync (() => {
m_busy_state = false;
Mouse.OverrideCursor = null; Mouse.OverrideCursor = null;
}, DispatcherPriority.ApplicationIdle); }, DispatcherPriority.ApplicationIdle);
} }
@ -836,9 +840,12 @@ namespace GARbro.GUI
var control = e.InputWidget as UIElement; var control = e.InputWidget as UIElement;
if (null != control) if (null != control)
{ {
bool busy_state = m_busy_state;
var param_dialog = new ArcParametersDialog (control, e.Notice); var param_dialog = new ArcParametersDialog (control, e.Notice);
param_dialog.Owner = this; param_dialog.Owner = this;
e.InputResult = param_dialog.ShowDialog() ?? false; e.InputResult = param_dialog.ShowDialog() ?? false;
if (busy_state)
SetBusyState();
} }
} }
} }