Changeset 252:823838b0be03


Ignore:
Timestamp:
May 9, 2011, 3:54:25 PM (13 years ago)
Author:
Evgeny Stambulchik <Evgeny.Stambulchik@…>
Branch:
default
Phase:
public
Message:

Avoid recursive calling of updateGUI() through asyncronous event propagation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/class/pf/Application.js

    r251 r252  
    3737    if (isFinite(T_e)) {
    3838        this.plasma.e.setT(T_e);
    39         this.plasma.i.setT(T_e);
    40         this.plasma.r.setT(T_e);
    41         this.updateGUI();
     39        if (!this.gui_locked) {
     40            this.plasma.i.setT(T_e);
     41            this.plasma.r.setT(T_e);
     42            this.updateGUI();
     43        }
    4244    }
    4345}
     
    6264    if (isFinite(T_i)) {
    6365        this.plasma.i.setT(T_i);
    64         this.plasma.r.setT(T_i);
    65         this.updateGUI();
     66        if (!this.gui_locked) {
     67            this.plasma.r.setT(T_i);
     68            this.updateGUI();
     69        }
    6670    }
    6771}
     
    428432        updateGUI : function()
    429433        {
     434            if (this.gui_locked) {
     435                return;
     436            }
     437           
     438            this.gui_locked = true;
     439           
    430440            if (this.prefs.currentConfigName) {
    431441                this.gui_configName.setLabel(this.prefs.currentConfigName);
     
    459469            this.updateFavoritesListView();
    460470            this.updateLegendListView();
     471           
     472            this.gui_locked = false;
    461473        },
    462474       
Note: See TracChangeset for help on using the changeset viewer.