Changeset 2017


Ignore:
Timestamp:
Oct 17, 2015 9:04:42 PM (6 years ago)
Author:
toby
Message:

update reload after refinement to make sure old Id is removed; also include a commented out possible cleaner alternate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r2015 r2017  
    35683568#                        self.G2plotNB.clear()
    35693569                    G2IO.ProjFileOpen(self)
     3570                    # The code below seems to open the first histogram in the tree
     3571                    # it does not seem to open sub-items, but will reload a phase.
     3572                    # Not exactly sure what this is doing and if it works properly
     3573                    # Modified to make sure that PickId and PickIdText are always set
     3574                    #
     3575
    35703576                    item, cookie = self.PatternTree.GetFirstChild(self.root)
    35713577                    while item and not Id:
     
    35873593                            self.dataDisplay.SetSelection(4)    #location of Drawing Data
    35883594                        self.dataDisplay.SetSelection(tabId)
     3595                        self.PickId = itemId
    35893596                    elif Id:
    3590                         self.PickIdText = None  #force reload of PickId contents
     3597                        self.PickId = Id
    35913598                        self.PatternTree.SelectItem(Id)
    3592 
     3599                    else: # make sure PickId contains some valid Id
     3600                        self.PickId = self.root
     3601                        self.PatternTree.SelectItem(Id)
     3602                    self.PickIdText = None  #force reload of PickId contents
     3603                    # alternate code. This re-selects current tree item
     3604                    # and then triggers the loading and replotting that is
     3605                    # expected.
     3606                    # Id =  self.root
     3607                    # txt = None
     3608                    # for txt in oldPath:
     3609                    #     Id = G2gd.GetPatternTreeItemId(self, Id, txt)
     3610                    #     #print Id,self.PatternTree.GetItemText(Id)
     3611                    # self.PickIdText = None  #force reload of page
     3612                    # self.PickId = Id
     3613                    # self.PatternTree.SelectItem(Id)
     3614                    # G2gd.MovePatternTreeToGrid(self,Id)
    35933615            finally:
    35943616                dlg2.Destroy()
Note: See TracChangeset for help on using the changeset viewer.