Index: src/sas/sascalc/data_util/qsmearing.py
===================================================================
--- src/sas/sascalc/data_util/qsmearing.py	(revision 345e7e4a8c6f5977c8c07032553b5ab00bdf837d)
+++ src/sas/sascalc/data_util/qsmearing.py	(revision d3911e3cf881d888113c59010d5c63db40c0181b)
@@ -41,5 +41,5 @@
         elif data.dqx_data == None or data.dqy_data == None:
             return None
-        return Pinhole2D(data)
+        return PySmear2D(data, model)
 
     if  not hasattr(data, "dx") and not hasattr(data, "dxl")\
@@ -142,2 +142,78 @@
     width = data.dx if data.dx is not None else 0
     return PySmear(Pinhole1D(q, width), model)
+
+
+class PySmear2D(object):
+    """
+    Q smearing class for SAS 2d pinhole data
+    """
+
+    def __init__(self, data=None, model=None):
+        self.data = data
+        self.model = model
+        self.accuracy = 'Low'
+        self.limit = 3.0
+        self.index = None
+        self.coords = 'polar'
+        self.smearer = True
+
+    def set_accuracy(self, accuracy='Low'):
+        """
+        Set accuracy.
+
+        :param accuracy:  string
+        """
+        self.accuracy = accuracy
+
+    def set_smearer(self, smearer=True):
+        """
+        Set whether or not smearer will be used
+
+        :param smearer: smear object
+
+        """
+        self.smearer = smearer
+
+    def set_data(self, data=None):
+        """
+        Set data.
+
+        :param data: DataLoader.Data_info type
+        """
+        self.data = data
+
+    def set_model(self, model=None):
+        """
+        Set model.
+
+        :param model: sas.models instance
+        """
+        self.model = model
+
+    def set_index(self, index=None):
+        """
+        Set index.
+
+        :param index: 1d arrays
+        """
+        self.index = index
+
+    def get_value(self):
+        """
+        Over sampling of r_nbins times phi_nbins, calculate Gaussian weights,
+        then find smeared intensity
+        """
+        if self.smearer:
+            res = Pinhole2D(data=self.data, index=self.index,
+                            nsigma=3.0, accuracy=self.accuracy,
+                            coords=self.coords)
+            val = self.model.evalDistribution(res.q_calc)
+            return res.apply(val)
+        else:
+            index = self.index if self.index is not None else slice(None)
+            qx_data = self.data.qx_data[index]
+            qy_data = self.data.qy_data[index]
+            q_calc = [qx_data, qy_data]
+            val = self.model.evalDistribution(q_calc)
+            return val
+
Index: src/sas/sascalc/fit/AbstractFitEngine.py
===================================================================
--- src/sas/sascalc/fit/AbstractFitEngine.py	(revision 345e7e4a8c6f5977c8c07032553b5ab00bdf837d)
+++ src/sas/sascalc/fit/AbstractFitEngine.py	(revision d3911e3cf881d888113c59010d5c63db40c0181b)
@@ -359,7 +359,4 @@
         if self.smearer != None:
             fn.set_index(self.idx)
-            # Get necessary data from self.data and set the data for smearing
-            fn.get_data()
-
             gn = fn.get_value()
         else:
Index: src/sas/sasgui/guiframe/gui_manager.py
===================================================================
--- src/sas/sasgui/guiframe/gui_manager.py	(revision 67b0a99ce9f69a9dfef035e8e4a06588c9f1602f)
+++ src/sas/sasgui/guiframe/gui_manager.py	(revision d3911e3cf881d888113c59010d5c63db40c0181b)
@@ -1990,6 +1990,7 @@
                 wx.PostEvent(self,
                              StatusEvent(status="Completed saving."))
-            except:
+            except Exception:
                 msg = "Error occurred while saving: "
+                msg += traceback.format_exc()
                 msg += "To save, the application panel should have a data set.."
                 wx.PostEvent(self, StatusEvent(status=msg))
@@ -2040,6 +2041,7 @@
                 logging.warning(msg)
                 wx.PostEvent(self, StatusEvent(status=msg, info="error"))
-        except:
+        except Exception:
             msg = "Error occurred while saving: "
+            msg += traceback.format_exc()
             msg += "To save, at least one application panel "
             msg += "should have a data set.."
Index: src/sas/sasgui/perspectives/fitting/basepage.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/basepage.py	(revision 9e0aa69abc3080680008f6c3525d79d3fb3ba4e9)
+++ src/sas/sasgui/perspectives/fitting/basepage.py	(revision 9e0aa69abc3080680008f6c3525d79d3fb3ba4e9)
@@ -52,5 +52,4 @@
     FONT_VARIANT = 1
     ON_MAC = True
-
 
 class BasicPage(ScrolledPanel, PanelBase):
@@ -1042,5 +1041,5 @@
                         disp_model = POLYDISPERSITY_MODELS['array']()
                         if hasattr(state, "values") and \
-                                 self.disp_cb_dict[item].GetValue() is True:
+                                 self.disp_cb_dict[item].GetValue():
                             if len(state.values) > 0:
                                 self.values = state.values
@@ -1451,4 +1450,17 @@
                 self.state_change = True
                 self._draw_model()
+                # Time delay has been introduced to prevent _handle error
+                # on Windows
+                # This part of code is executed when model is selected and
+                # it's parameters are changed (with respect to previously
+                # selected model). There are two Iq evaluations occuring one
+                # after another and therefore there may be compilation error
+                # if model is calculated for the first time.
+                # This seems to be Windows only issue - haven't tested on Linux
+                # though.The proper solution (other than time delay) requires
+                # more fundemental code refatoring
+                # Wojtek P. Nov 7, 2016
+                if not ON_MAC:
+                    time.sleep(0.1)
                 self.Refresh()
 
@@ -2129,5 +2141,5 @@
                 flag = False
             else:
-                self.Npts_fit.SetValue(str(len(index_data[index_data is True])))
+                self.Npts_fit.SetValue(str(len(index_data[index_data])))
                 self.fitrange = True
 
@@ -2164,7 +2176,5 @@
                 flag = False
             else:
-                val = index_data[index_data is True]
-                val = len(val) if isinstance(val, list) else 1
-                self.Npts_fit.SetValue(str(val))
+                self.Npts_fit.SetValue(str(len(index_data[index_data])))
                 self.fitrange = True
 
@@ -2390,5 +2400,6 @@
 
         # Redraw the model
-        self._draw_model()
+        #  Wojtek P. Nov 7, 2016: Redrawing seems to be unnecessary here
+        # self._draw_model()
         # self._undo.Enable(True)
         event = PageInfoEvent(page=self)
@@ -2609,5 +2620,5 @@
             Layout after self._draw_model
         """
-        if ON_MAC is True:
+        if ON_MAC:
             time.sleep(1)
 
Index: src/sas/sasgui/perspectives/fitting/fitpage.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/fitpage.py	(revision 345e7e4a8c6f5977c8c07032553b5ab00bdf837d)
+++ src/sas/sasgui/perspectives/fitting/fitpage.py	(revision 24fd27a2f35f316c4971c10c5c3a317dd9357597)
@@ -81,8 +81,8 @@
         flag = check_data_validity(self.data) & (self.model is not None)
         self.btFit.Enable(flag)
-        
+
     def on_set_focus(self, event):
         """
-        Override the basepage focus method to ensure the save flag is set 
+        Override the basepage focus method to ensure the save flag is set
         properly when focusing on the fit page.
         """
@@ -238,5 +238,5 @@
 
         weighting_set_box = wx.StaticBox(self, wx.ID_ANY,
-                                'Set Weighting by Selecting dI Source')
+                                         'Set Weighting by Selecting dI Source')
         weighting_box = wx.StaticBoxSizer(weighting_set_box, wx.HORIZONTAL)
         sizer_weighting = wx.BoxSizer(wx.HORIZONTAL)
@@ -1164,7 +1164,7 @@
         if event is not None:
             if (event.GetEventObject() == self.formfactorbox
-                        and self.structurebox.GetLabel() != 'None')\
-                        or event.GetEventObject() == self.structurebox\
-                        or event.GetEventObject() == self.multifactorbox:
+                    and self.structurebox.GetLabel() != 'None')\
+                    or event.GetEventObject() == self.structurebox\
+                    or event.GetEventObject() == self.multifactorbox:
                 copy_flag = self.get_copy_params()
                 is_poly_enabled = self.enable_disp.GetValue()
@@ -1206,5 +1206,6 @@
                     self._keep.Enable(not self.batch_on)
                     self._set_save_flag(True)
-                    self._set_smear(self.data)
+            #Setting smearing for cases with and without data.
+            self._set_smear(self.data)
 
             # more disables for 2D
@@ -1213,5 +1214,7 @@
             try:
                 # update smearer sizer
-                self.onSmear(None)
+                #This call for smearing set up caused double evaluation of
+                #I(q) and double compilation as results
+                #self.onSmear(None)
                 temp_smear = None
                 if not self.disable_smearer.GetValue():
@@ -1227,10 +1230,10 @@
             # set smearing value whether or not data contain the smearing info
             evt = ModelEventbox(model=self.model,
-                            smearer=temp_smear,
-                            enable_smearer=not self.disable_smearer.GetValue(),
-                            qmin=float(self.qmin_x),
-                            uid=self.uid,
-                            caption=self.window_caption,
-                            qmax=float(self.qmax_x))
+                                smearer=temp_smear,
+                                enable_smearer=not self.disable_smearer.GetValue(),
+                                qmin=float(self.qmin_x),
+                                uid=self.uid,
+                                caption=self.window_caption,
+                                qmax=float(self.qmax_x))
 
             self._manager._on_model_panel(evt=evt)
@@ -1616,5 +1619,5 @@
                 return
         # check if it is pinhole smear and get min max if it is.
-        if data.dx is not None and not numpy.any(data.dx):
+        if data.dx is not None and numpy.any(data.dx):
             self.smear_type = "Pinhole"
             self.dq_l = data.dx[0]
Index: src/sas/sasgui/perspectives/fitting/fitting.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/fitting.py	(revision 1a5d5f2d6cd4b4999b40c7fbc72a7a295fa78d9d)
+++ src/sas/sasgui/perspectives/fitting/fitting.py	(revision 1a5d5f2d6cd4b4999b40c7fbc72a7a295fa78d9d)
@@ -864,5 +864,4 @@
                 enable1D=enable1D, enable2D=enable2D,
                 qmin=qmin, qmax=qmax, weight=weight)
-            self._mac_sleep(0.2)
 
     def _mac_sleep(self, sec=0.2):
@@ -1964,5 +1963,5 @@
                 ## May need rethinking  
                 ##
-                ##    -PDB August 12, 2014                  
+                ##    -PDB August 12, 2014
                 while self.calc_1D.isrunning():
                     time.sleep(0.1)
Index: src/sas/sasgui/perspectives/fitting/model_thread.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/model_thread.py	(revision 286c7571e8019b4c28a92d3d497cac7da825076c)
+++ src/sas/sasgui/perspectives/fitting/model_thread.py	(revision d3911e3cf881d888113c59010d5c63db40c0181b)
@@ -82,6 +82,4 @@
             fn.set_model(self.model)
             fn.set_index(index_model)
-            # Get necessary data from self.data and set the data for smearing
-            fn.get_data()
             # Calculate smeared Intensity
             #(by Gaussian averaging): DataLoader/smearing2d/Smearer2D()
@@ -89,7 +87,8 @@
         else:
             # calculation w/o smearing
-            value = self.model.evalDistribution(\
-                [self.data.qx_data[index_model],
-                 self.data.qy_data[index_model]])
+            value = self.model.evalDistribution([
+                self.data.qx_data[index_model],
+                self.data.qy_data[index_model]
+            ])
         output = numpy.zeros(len(self.data.qx_data))
         # output default is None
