fix: Save combo report before closing settings dialog
Bugs (fixed): * Combo report configuration doesn't save on OK click (does save on Apply click though)
This commit is contained in:
1 parent
0ed9142cf0
commit
eabc4bee4c
2 files changed
+5
-1
No files matched your search
@@ -36,6 +36,7 @@
|
||||
OKCommandParameter="{Binding result}"
|
||||
ApplyCommand="{Binding commit_cmd}"
|
||||
ApplyCommandParameter="{Binding result}"
|
||||
CloseOnOK="False"
|
||||
/>
|
||||
</Grid>
|
||||
</AdornerDecorator>
|
||||
|
||||
@@ -52,10 +52,13 @@ namespace mbts.analytics {
|
||||
Window mk_settings_win() {
|
||||
var vm = new ComboReportSettingsVM(model.accounts_source.OnDispatcher());
|
||||
vm.configuration_vm.load_from(_data.report);
|
||||
vm.SubscribeDisposed(vm.commit_cmd.subscribe_executed(_model.save));
|
||||
var win = new ComboReportSettingsDialog {
|
||||
DataContext = vm
|
||||
};
|
||||
vm.SubscribeDisposed(vm.commit_cmd.subscribe_executed(r => {
|
||||
_model.save(r);
|
||||
win.Close();
|
||||
}));
|
||||
return win;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user