Revision: 5137
          http://sourceforge.net/p/jump-pilot/code/5137
Author:   michaudm
Date:     2016-11-01 13:57:35 +0000 (Tue, 01 Nov 2016)
Log Message:
-----------
Fix #438 Exception while saving the project before closing application

Modified Paths:
--------------
    core/trunk/ChangeLog
    core/trunk/src/com/vividsolutions/jump/workbench/ui/WorkbenchFrame.java

Modified: core/trunk/ChangeLog
===================================================================
--- core/trunk/ChangeLog        2016-11-01 11:08:47 UTC (rev 5136)
+++ core/trunk/ChangeLog        2016-11-01 13:57:35 UTC (rev 5137)
@@ -3,6 +3,9 @@
 # 2. make sure that lines break at 80 chars for constricted display situations
 #<-------------------------------- 80 chars 
---------------------------------->#
 
+2016-11-01 mmichaud <m.michael.mich...@orange.fr>
+  * Fix #438 Exception while saving the project before closing application
+
 2016-10-31 Giuseppe Aruta
   * October Sextante sprint code:
     - Added Sextante Data Explorer and Pick Coordinates plugins

Modified: 
core/trunk/src/com/vividsolutions/jump/workbench/ui/WorkbenchFrame.java
===================================================================
--- core/trunk/src/com/vividsolutions/jump/workbench/ui/WorkbenchFrame.java     
2016-11-01 11:08:47 UTC (rev 5136)
+++ core/trunk/src/com/vividsolutions/jump/workbench/ui/WorkbenchFrame.java     
2016-11-01 13:57:35 UTC (rev 5137)
@@ -1833,8 +1833,8 @@
         }
     }
 
-    private class DefaultApplicationExitHandler implements
-            ApplicationExitHandler {
+    private class DefaultApplicationExitHandler implements 
ApplicationExitHandler {
+
         public void exitApplication(JFrame mainFrame) {
             PlugInContext context = getContext().createPlugInContext();
             if (confirmClose(I18N.get("ui.WorkbenchFrame.exit-jump"),
@@ -1850,6 +1850,14 @@
 
                     if (res == JOptionPane.YES_OPTION) {
                         SaveProjectPlugIn saveProjectPlugIn = new 
SaveProjectPlugIn();
+                        //[mmichaud] added on 2016-11-01 to fix #438
+                        UndoableEditReceiver undoableEditReceiver = 
workbenchContext
+                                .getLayerManager() != null ? 
workbenchContext.getLayerManager()
+                                .getUndoableEditReceiver() : null;
+                        if (undoableEditReceiver != null) {
+                            undoableEditReceiver.startReceiving();
+                        }
+                        // end of fix
                         saveProjectPlugIn.initialize(context);
                         if (saveProjectPlugIn.execute(context)) {
                             saveProjectPlugIn.initialize(context);
@@ -1868,6 +1876,7 @@
                     }
 
                 } catch (Exception e) {
+                    e.printStackTrace();
                     log(null, e);
                 }
 


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to