Commit ed54b084 authored by Frank Bergmann's avatar Frank Bergmann

- Fixed persistence of zoom buttons

- Fixed default type of task dependencies for compatibility
parent 9aadc669
......@@ -908,7 +908,7 @@ Ext.define('GanttEditor.controller.GanttSchedulingController', {
var succEndDate = PO.Utilities.pgToDate(succ.get('end_date')); if (!succEndDate) { return false; }
var dependencyTypeId = dep.type_id; // 9660=FF, 9662=FS, 9664=SF, 9666=SS
if (dependencyTypeId == 9650) dependencyTypeId = 9660; // compatibility
if (dependencyTypeId == 9650) dependencyTypeId = 9662; // compatibility
// If the start of succ is before the end of pred...
var changedNodes = [];
......
......@@ -223,6 +223,10 @@ Ext.define('GanttEditor.controller.GanttZoomController', {
me.getGanttBarPanel().needsRedraw = true;
me.senchaPreferenceStore.setPreference('axisEndX', ganttBarPanel.axisEndX); // Persist the new zoom parameters
me.senchaPreferenceStore.setPreference('axisStartTime', ganttBarPanel.axisStartDate.getTime());
me.senchaPreferenceStore.setPreference('axisEndTime', ganttBarPanel.axisEndDate.getTime());
if (me.debug) console.log('GanttEditor.controller.GanttZoomController.onButtonZoomIn: Finished');
},
......@@ -269,7 +273,9 @@ Ext.define('GanttEditor.controller.GanttZoomController', {
ganttBarPanel.axisEndX = endX;
me.getGanttBarPanel().needsRedraw = true;
me.senchaPreferenceStore.setPreference('axisEndX', ganttBarPanel.axisEndX); // Persist the new zoom parameters
me.senchaPreferenceStore.setPreference('axisStartTime', ganttBarPanel.axisStartDate.getTime());
me.senchaPreferenceStore.setPreference('axisEndTime', ganttBarPanel.axisEndDate.getTime());
if (me.debug) console.log('GanttEditor.controller.GanttZoomController.onButtonZoomOut: Finished');
},
......@@ -380,6 +386,7 @@ Ext.define('GanttEditor.controller.GanttZoomController', {
if (me.debug) console.log('GanttEditor.controller.GanttZoomController.onButtonZoomCenter: Starting');
var ganttTreePanel = me.getGanttTreePanel();
var ganttBarPanel = me.getGanttBarPanel();
// Is a task selected? Otherwise center around the entire project
var selectionModel = ganttTreePanel.getSelectionModel();
......@@ -397,6 +404,11 @@ Ext.define('GanttEditor.controller.GanttZoomController', {
}
*/
me.senchaPreferenceStore.setPreference('axisEndX', ganttBarPanel.axisEndX); // Persist the new zoom parameters
me.senchaPreferenceStore.setPreference('axisStartTime', ganttBarPanel.axisStartDate.getTime());
me.senchaPreferenceStore.setPreference('axisEndTime', ganttBarPanel.axisEndDate.getTime());
if (me.debug) console.log('GanttEditor.controller.GanttZoomController.onButtonZoomCenter: Finished');
},
......
......@@ -955,7 +955,7 @@ Ext.define('GanttEditor.view.GanttBarPanel', {
var depName = 'Task dependency';
var depTypeId = dependencyModel.type_id;
if (depTypeId == 9650) depTypeId = 9660; // compatibility
if (depTypeId == 9650) depTypeId = 9662; // compatibility
switch (depTypeId) {
case 9660: depName = '@finish_to_finish_l10n@'; break;
case 9662: depName = '@finish_to_start_l10n@'; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment