Index: src/sas/sasgui/perspectives/fitting/fitpanel.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/fitpanel.py	(revision 05228b001b88187176fb9a2d1bfd9098273fb854)
+++ src/sas/sasgui/perspectives/fitting/fitpanel.py	(revision a95ae9a74d8ba4ec9ee4b79e7e55739860f0b63f)
@@ -13,4 +13,5 @@
 from sas.sasgui.guiframe.events import StatusEvent
 from sas.sasgui.guiframe.dataFitting import check_data_validity
+from sas.sasgui.perspectives.fitting.simfitpage import SimultaneousFitPage
 
 import basepage
@@ -18,4 +19,5 @@
 _BOX_WIDTH = 80
 
+
 class FitPanel(nb, PanelBase):
     """
@@ -26,7 +28,7 @@
 
     """
-    ## Internal name for the AUI manager
+    # Internal name for the AUI manager
     window_name = "Fit panel"
-    ## Title to appear on top of the window
+    # Title to appear on top of the window
     window_caption = "Fit Panel "
     CENTER_PANE = True
@@ -40,28 +42,28 @@
                     wx.CLIP_CHILDREN)
         PanelBase.__init__(self, parent)
-        #self.SetWindowStyleFlag(style=nb.FNB_FANCY_TABS)
+        # self.SetWindowStyleFlag(style=nb.FNB_FANCY_TABS)
         self._manager = manager
         self.parent = parent
         self.event_owner = None
-        #dictionary of miodel {model class name, model class}
+        # dictionary of miodel {model class name, model class}
         self.menu_mng = models.ModelManager()
         self.model_list_box = self.menu_mng.get_model_list()
-        #pageClosedEvent = nb.EVT_FLATNOTEBOOK_PAGE_CLOSING
+        # pageClosedEvent = nb.EVT_FLATNOTEBOOK_PAGE_CLOSING
         self.model_dictionary = self.menu_mng.get_model_dictionary()
         self.pageClosedEvent = wx.aui.EVT_AUINOTEBOOK_PAGE_CLOSE
 
         self.Bind(self.pageClosedEvent, self.on_close_page)
-        ## save the title of the last page tab added
+        # save the title of the last page tab added
         self.fit_page_name = {}
-        ## list of existing fit page
+        # list of existing fit page
         self.opened_pages = {}
-        #index of fit page
+        # index of fit page
         self.fit_page_index = 0
-        #index of batch page
+        # index of batch page
         self.batch_page_index = 0
-        #page of simultaneous fit
+        # page of simultaneous fit
         self.sim_page = None
         self.batch_page = None
-        ## get the state of a page
+        # get the state of a page
         self.Bind(basepage.EVT_PAGE_INFO, self._onGetstate)
         self.Bind(basepage.EVT_PREVIOUS_STATE, self._onUndo)
@@ -80,30 +82,25 @@
         """
         return an xml node containing state of the panel
-         that guiframe can write to file
-        """
-        msg = ""
+        that guiframe can write to file
+        """
+        # Iterate through all pages and check for batch fitting
+        batch_state = None
+        if self.sim_page is not None:
+            batch_state = self.sim_page.set_state()
+
         for uid, page in self.opened_pages.iteritems():
-            if page.batch_on:
-                pos = self.GetPageIndex(page)
-                if pos != -1 and page not in [self.sim_page, self.batch_page]:
-                    msg += "%s .\n" % str(self.GetPageText(pos))
-            else:
-                data = page.get_data()
-                # state must be cloned
-                state = page.get_state().clone()
-                if data is not None and page.model is not None:
-                    new_doc = self._manager.state_reader.write_toXML(data,
-                                                                     state)
-                    if doc != None and hasattr(doc, "firstChild"):
-                        child = new_doc.firstChild.firstChild
-                        doc.firstChild.appendChild(child)
-                    else:
-                        doc = new_doc
-        if msg.strip() != "":
-            temp = "Save Project is not supported for Batch page.\n"
-            temp += "The following pages will not be save:\n"
-            message = temp + msg
-            wx.PostEvent(self._manager.parent, StatusEvent(status=message,
-                                                            info="warning"))
+            data = page.get_data()
+            # state must be cloned
+            state = page.get_state().clone()
+            if data is not None or page.model is not None:
+                new_doc = self._manager.state_reader.write_toXML(data,
+                                                                 state,
+                                                                 batch_state)
+                if doc is not None and hasattr(doc, "firstChild"):
+                    child = new_doc.firstChild.firstChild
+                    doc.firstChild.appendChild(child)
+                else:
+                    doc = new_doc
+
         return doc
 
@@ -363,5 +360,5 @@
             panel.set_index_model(self.batch_page_index)
         else:
-            #Increment index of fit page
+            # Increment index of fit page
             panel = FitPage(parent=self)
             self.fit_page_index += 1
@@ -526,5 +523,5 @@
                     self.SetSelection(pos)
                     return page
-        #create new page and add data
+        # create new page and add data
         page = self.add_empty_page()
         pos = self.GetPageIndex(page)
