Changeset 3c2011e in sasview for src


Ignore:
Timestamp:
Jun 18, 2015 2:38:28 PM (10 years ago)
Author:
Doucet, Mathieu <doucetm@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
f0066404
Parents:
e54dbc3e
Message:

Fixes #429 and avoids adding a second Fitting menu when loading a project.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/guiframe/gui_manager.py

    r7801df8 r3c2011e  
    12961296        #replace or add a new menu for the current plugin 
    12971297        pos = self._menubar.FindMenu(str(self._applications_menu_name)) 
     1298        if pos == -1 and self._applications_menu_pos > 0: 
     1299            pos = self._applications_menu_pos 
    12981300        if pos != -1: 
    12991301            menu_list = self._current_perspective.populate_menu(self) 
    13001302            if menu_list: 
    13011303                for (menu, name) in menu_list: 
     1304                    print "[%s]" % name 
    13021305                    self._menubar.Replace(pos, menu, name) 
    13031306                    self._applications_menu_name = name 
     1307                self._applications_menu_pos = pos 
    13041308            else: 
    13051309                self._menubar.Remove(pos) 
    13061310                self._applications_menu_name = None 
    1307             #get the position of the menu when it first added 
    1308             self._applications_menu_pos = pos 
     1311                self._applications_menu_pos = -1 
    13091312        else: 
    13101313            menu_list = self._current_perspective.populate_menu(self) 
     
    13161319                        if help_pos == -1: 
    13171320                            self._menubar.Append(menu, name) 
     1321                            self._applications_menu_pos = -1 
    13181322                        else: 
    13191323                            self._menubar.Insert(help_pos-1, menu, name) 
     1324                            self._applications_menu_pos = help_pos - 1 
    13201325                    else: 
    13211326                        self._menubar.Insert(self._applications_menu_pos, menu, name) 
Note: See TracChangeset for help on using the changeset viewer.