Wxwidgets: Read the watch expressions in the right thread

This commit is contained in:
Ilari Liusvaara 2012-01-20 19:37:16 +02:00
parent 23d80813f6
commit 72c42cc28d

View file

@ -1089,8 +1089,11 @@ void wxwin_mainwindow::handle_menu_click_cancelable(wxCommandEvent& e)
runemufn([&old_watches]() { old_watches = get_watches(); }); runemufn([&old_watches]() { old_watches = get_watches(); });
std::string filename = pick_file(this, "Save watches to file", "."); std::string filename = pick_file(this, "Save watches to file", ".");
std::ofstream out(filename.c_str()); std::ofstream out(filename.c_str());
for(auto i : old_watches) for(auto i : old_watches) {
out << i << std::endl << get_watchexpr_for(i) << std::endl; std::string val;
runemufn([i, &val]() { val = get_watchexpr_for(i); });
out << i << std::endl << val << std::endl;
}
out.close(); out.close();
return; return;
} }