Changeset 279:623ab1e3c18d


Ignore:
Timestamp:
Aug 15, 2011, 5:44:36 PM (13 years ago)
Author:
Evgeny Stambulchik <Evgeny.Stambulchik@…>
Branch:
default
Phase:
public
Message:

Make sure GUI does not remain locked forever.

File:
1 edited

Legend:

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

    r278 r279  
    438438            this.gui_locked = true;
    439439           
    440             if (this.prefs.currentConfigName) {
    441                 this.gui_configName.setLabel(this.prefs.currentConfigName);
    442             }
    443            
    444             this.gui_N_e.setNumValue(this.plasma.e.getN());
    445             this.gui_T_e.setNumValue(this.plasma.e.getT());
    446            
    447             this.gui_N_i.setNumValue(this.plasma.i.getN());
    448             this.gui_T_i.setNumValue(this.plasma.i.getT());
    449             this.gui_Z_i.setValue(this.plasma.i.getQ());
    450             this.gui_M_i.setNumValue(this.plasma.i.getM());
    451 
    452             this.gui_P_r.setValue(100*this.plasma.P_r);
    453            
    454             this.gui_N_r.setNumValue(this.plasma.r.getN());
    455             this.gui_T_r.setNumValue(this.plasma.r.getT());
    456             this.gui_Z_r.setValue(this.plasma.r.getQ());
    457             this.gui_Zcore.setValue((this.plasma.r.getQ() + 1) + '');
    458             this.gui_M_r.setNumValue(this.plasma.r.getM());
    459            
    460             this.gui_B.setNumValue(this.plasma.B);
    461            
    462             this.gui_n_u.setValue(this.plasma.n_u);
    463             this.gui_n_l.setValue(this.plasma.n_l);
    464            
    465             // Update the currently selected entity
    466             this.updateEntityValue();
    467            
    468             // Update the list of favorites
    469             this.updateFavoritesListView();
    470             this.updateLegendListView();
     440            // make sure GUI does not remain locked forever...
     441            try {
     442                if (this.prefs.currentConfigName) {
     443                    this.gui_configName.setLabel(this.prefs.currentConfigName);
     444                }
     445
     446                this.gui_N_e.setNumValue(this.plasma.e.getN());
     447                this.gui_T_e.setNumValue(this.plasma.e.getT());
     448
     449                this.gui_N_i.setNumValue(this.plasma.i.getN());
     450                this.gui_T_i.setNumValue(this.plasma.i.getT());
     451                this.gui_Z_i.setValue(this.plasma.i.getQ());
     452                this.gui_M_i.setNumValue(this.plasma.i.getM());
     453
     454                this.gui_P_r.setValue(100*this.plasma.P_r);
     455
     456                this.gui_N_r.setNumValue(this.plasma.r.getN());
     457                this.gui_T_r.setNumValue(this.plasma.r.getT());
     458                this.gui_Z_r.setValue(this.plasma.r.getQ());
     459                this.gui_Zcore.setValue((this.plasma.r.getQ() + 1) + '');
     460                this.gui_M_r.setNumValue(this.plasma.r.getM());
     461
     462                this.gui_B.setNumValue(this.plasma.B);
     463
     464                this.gui_n_u.setValue(this.plasma.n_u);
     465                this.gui_n_l.setValue(this.plasma.n_l);
     466
     467                // Update the currently selected entity
     468                this.updateEntityValue();
     469
     470                // Update the list of favorites
     471                this.updateFavoritesListView();
     472                this.updateLegendListView();
     473            } catch (err) {
     474                this.error(err);
     475            }
    471476           
    472477            this.gui_locked = false;
Note: See TracChangeset for help on using the changeset viewer.