Changeset 2528


Ignore:
Timestamp:
Nov 16, 2016 4:10:58 PM (5 years ago)
Author:
vondreele
Message:

make all dataDisplay windows be right justified wrt last position. Adjusts position if too close to right edge.
Also implement right click on tree item to refresh data window & raise to top.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r2522 r2528  
    23302330        self.PatternTree = G2G.G2TreeCtrl(id=wxID_PATTERNTREE,
    23312331            parent=self.mainPanel, pos=wx.Point(0, 0),style=wx.TR_DEFAULT_STYLE )
    2332         self.PatternTree.Bind(wx.EVT_TREE_SEL_CHANGED, self.OnPatternTreeSelChanged)
     2332        self.PatternTree.Bind(wx.EVT_TREE_SEL_CHANGED,self.OnPatternTreeSelChanged)
     2333        self.PatternTree.Bind(wx.EVT_TREE_ITEM_RIGHT_CLICK,self.OnPatternTreeSelChanged)
    23332334        self.PatternTree.Bind(wx.EVT_TREE_ITEM_COLLAPSED,
    23342335            self.OnPatternTreeItemCollapsed, id=wxID_PATTERNTREE)
     
    24282429        self.dataDisplayPhaseText = ''
    24292430        self.lastTreeSetting = []
     2431        self.lastSize = [0,0]
    24302432       
    24312433        arg = sys.argv
  • trunk/GSASIIgrid.py

    r2521 r2528  
    25132513       
    25142514    def setSizePosLeft(self,Width):
    2515         clientSize = wx.ClientDisplayRect()
     2515        Width = list(Width)
     2516        Pos = self.GetPosition()
     2517        lastSize = self.G2frame.lastSize
     2518        clientSize = wx.ClientDisplayRect()     #display window size (e.g. 1304x768)
    25162519        Width[1] = min(Width[1],clientSize[2]-300)
    25172520        Width[0] = max(Width[0],300)
    25182521        self.SetSize(Width)
     2522        if lastSize[0]:
     2523            Pos[0] += lastSize[0]-Width[0]
     2524        offSet = Pos[0]+Width[0]-clientSize[2]
     2525        if offSet > 0:
     2526            Pos[0] -= offSet
    25192527#        self.SetPosition(wx.Point(clientSize[2]-Width[0],clientSize[1]+250))
     2528        self.SetPosition(wx.Point(Pos[0],Pos[1]))
     2529        self.G2frame.lastSize = Width
    25202530       
    25212531    def Clear(self):
Note: See TracChangeset for help on using the changeset viewer.