[PE] Fix guides
This commit is contained in:
		
							parent
							
								
									c67d30f897
								
							
						
					
					
						commit
						dfeea528ac
					
				| 
						 | 
				
			
			@ -383,9 +383,11 @@ define([
 | 
			
		|||
                value = parseInt(Common.localStorage.getItem("pe-settings-paste-button"));
 | 
			
		||||
                Common.Utils.InternalSettings.set("pe-settings-paste-button", value);
 | 
			
		||||
                this.api.asc_setVisiblePasteButton(!!value);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            this.api.put_ShowSnapLines(Common.Utils.InternalSettings.get("pe-settings-showsnaplines"));
 | 
			
		||||
                value = Common.localStorage.getBool("pe-settings-showsnaplines");
 | 
			
		||||
                Common.Utils.InternalSettings.set("pe-settings-showsnaplines", value);
 | 
			
		||||
                this.api.asc_setShowSmartGuides(value);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            menu.hide();
 | 
			
		||||
        },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -861,7 +861,13 @@ define([
 | 
			
		|||
                me.api.asc_setAutoSaveGap(Common.Utils.InternalSettings.get("pe-settings-autosave"));
 | 
			
		||||
                /** coauthoring end **/
 | 
			
		||||
 | 
			
		||||
                Common.Utils.InternalSettings.set("pe-settings-showsnaplines", me.api.get_ShowSnapLines());
 | 
			
		||||
                value = Common.localStorage.getBool("pe-settings-showsnaplines", true);
 | 
			
		||||
                Common.Utils.InternalSettings.set("pe-settings-showsnaplines", value);
 | 
			
		||||
                me.api.asc_setShowSmartGuides(value);
 | 
			
		||||
 | 
			
		||||
                value = Common.localStorage.getBool("pe-settings-showguides");
 | 
			
		||||
                Common.Utils.InternalSettings.set("pe-settings-showguides", value);
 | 
			
		||||
                me.api.asc_setShowGuides(value);
 | 
			
		||||
 | 
			
		||||
                var application = me.getApplication();
 | 
			
		||||
                var toolbarController           = application.getController('Toolbar'),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -222,6 +222,7 @@ define([
 | 
			
		|||
 | 
			
		||||
        onGuidesShow: function(state) {
 | 
			
		||||
            this.api.asc_setShowGuides(state);
 | 
			
		||||
            Common.localStorage.setBool('pe-settings-showguides', state);
 | 
			
		||||
            Common.NotificationCenter.trigger('edit:complete', this.view);
 | 
			
		||||
        },
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -248,6 +249,8 @@ define([
 | 
			
		|||
 | 
			
		||||
        onGuidesSmartShow: function(state) {
 | 
			
		||||
            this.api.asc_setShowSmartGuides(state);
 | 
			
		||||
            Common.localStorage.setBool('pe-settings-showsnaplines', state);
 | 
			
		||||
            Common.Utils.InternalSettings.set("pe-settings-showsnaplines", state);
 | 
			
		||||
            Common.NotificationCenter.trigger('edit:complete', this.view);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -711,7 +711,8 @@ define([
 | 
			
		|||
                Common.localStorage.setItem("pe-settings-autosave", this.chAutosave.isChecked() ? 1 : 0);
 | 
			
		||||
            if (this.mode.canForcesave)
 | 
			
		||||
                Common.localStorage.setItem("pe-settings-forcesave", this.chForcesave.isChecked() ? 1 : 0);
 | 
			
		||||
            Common.Utils.InternalSettings.set("pe-settings-showsnaplines", this.chAlignGuides.isChecked());
 | 
			
		||||
 | 
			
		||||
            Common.localStorage.setBool("pe-settings-showsnaplines", this.chAlignGuides.isChecked());
 | 
			
		||||
 | 
			
		||||
            Common.localStorage.setItem("pe-macros-mode", this.cmbMacros.getValue());
 | 
			
		||||
            Common.Utils.InternalSettings.set("pe-macros-mode", this.cmbMacros.getValue());
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue