main_win.cc
branchgui
changeset 66 4ca5a537ef07
parent 61 d5668800f774
child 68 1a27576aa199
equal deleted inserted replaced
16:b97007098c6a 17:1dc5208a8177
   262   fcdialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
   262   fcdialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
   263   fcdialog.add_button(Gtk::Stock::OPEN, Gtk::RESPONSE_ACCEPT);
   263   fcdialog.add_button(Gtk::Stock::OPEN, Gtk::RESPONSE_ACCEPT);
   264   if (fcdialog.run() == Gtk::RESPONSE_ACCEPT)
   264   if (fcdialog.run() == Gtk::RESPONSE_ACCEPT)
   265   {
   265   {
   266     Glib::ustring filename = fcdialog.get_filename();
   266     Glib::ustring filename = fcdialog.get_filename();
   267     mapstorage.readFromFile(filename);
   267     if (!mapstorage.readFromFile(filename))
   268     mapstorage.file_name = filename;
   268     {
   269     mapstorage.modified = false;
   269       mapstorage.file_name = filename;
   270     gd_canvas.drawGraph();
   270       mapstorage.modified = false;
   271     mapwin.update();
   271       gd_canvas.drawGraph();
       
   272       mapwin.update();
       
   273     }
   272   }
   274   }
   273 }
   275 }
   274 
   276 
   275 void MainWin::saveFile()
   277 void MainWin::saveFile()
   276 {
   278 {