Ignore:
Timestamp:
Aug 15, 2012 6:52:34 PM (12 years ago)
Author:
Jae Cho <jhjcho@…>
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:
f866fb5
Parents:
25e4dda
Message:

broken plot/graph modification panel fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansguiframe/src/sans/guiframe/local_perspectives/plotting/appearanceDialog.py

    r3fdb68a r9f51c2c  
    77 
    88/** 
    9         This software was developed by Institut Laue-Langevin as part of 
    10         Distributed Data Analysis of Neutron Scattering Experiments (DANSE). 
    11  
    12         Copyright 2012 Institut Laue-Langevin 
     9    This software was developed by Institut Laue-Langevin as part of 
     10    Distributed Data Analysis of Neutron Scattering Experiments (DANSE). 
     11 
     12    Copyright 2012 Institut Laue-Langevin 
    1313 
    1414**/ 
     
    2424 
    2525 
    26 class appearanceDialog(wx.Dialog): 
     26class appearanceDialog(wx.Frame): 
    2727 
    2828    def __init__(self,parent,title): 
    29         super(appearanceDialog,self).__init__(parent, title=title, 
    30                                               size=(570, 430)) 
    31  
    32         self.symbolLabels = self.get_symbol_label() 
    33         self.colorLabels = self.get_color_label() 
     29        super(appearanceDialog,self).__init__(parent, title=title,size=(570,450), style=wx.DEFAULT_FRAME_STYLE|wx.FRAME_FLOAT_ON_PARENT) 
     30 
     31        self.okay_clicked = False 
     32        self.parent = parent 
     33        self.symbolLabels = self.parent.get_symbol_label() 
     34        self.colorLabels = self.parent.get_color_label() 
    3435 
    3536 
     
    6465        symbolText = wx.StaticText(panel, label='Shape') 
    6566        colorText = wx.StaticText(panel, label='Color') 
    66         sizeText = wx.StaticText(panel, label='Size') 
     67        sizeText = wx.StaticText(panel, label='Size ') 
    6768        labelText = wx.StaticText(panel, label='Legend label') 
    6869 
     
    7778 
    7879        # buttons 
    79         OkButton = wx.Button(panel, wx.ID_OK, label='OK') 
     80        OkButton = wx.Button(panel, label='OK') 
     81        OkButton.Bind(wx.EVT_BUTTON,self.onOK) 
    8082        cancelButton = wx.Button(panel, label='Cancel') 
    8183        cancelButton.Bind(wx.EVT_BUTTON, self.CloseDlg) 
     
    8688 
    8789        ihbox1.Add(sizeText, flag = wx.ALL| wx.ALIGN_LEFT , border=10) 
    88         ihbox1.Add(self.sizeComboBox, flag =  wx.ALL | wx.ALIGN_LEFT , border=10) 
     90        ihbox1.Add(self.sizeComboBox, flag =  wx.ALL|wx.RIGHT | wx.ALIGN_LEFT , border=10) 
    8991        ihbox1.Add(self.sizeCustomButton, flag = wx.ALIGN_LEFT | wx.ALL, border=10) 
    9092 
     
    9496 
    9597 
    96         ivbox2.Add(ihbox1, flag =  wx.ALL | wx.ALIGN_RIGHT,border=10) 
    97         ivbox2.Add(ihbox2, flag =  wx.ALL | wx.ALIGN_RIGHT,border=10) 
     98        ivbox2.Add(ihbox1, flag =wx.ALIGN_LEFT,border=10) 
     99        ivbox2.Add(ihbox2, flag =wx.ALIGN_LEFT,border=10) 
    98100 
    99101         
    100         hbox1.Add(ivbox1,flag =  wx.EXPAND | wx.ALIGN_LEFT ,border=10) 
    101         hbox1.Add(ivbox2,flag =  wx.EXPAND | wx.ALIGN_RIGHT ,border=10) 
     102        hbox1.Add(ivbox1,flag =wx.ALIGN_LEFT ,border=10) 
     103        hbox1.Add(ivbox2,flag =wx.ALIGN_LEFT ,border=10) 
    102104 
    103105    
     
    105107        hbox2.Add(cancelButton, flag = wx.ALL | wx.ALIGN_RIGHT, border=10) 
    106108 
    107         hbox3.Add(labelText, flag= wx.EXPAND | wx.ALL |  wx.ALIGN_LEFT, border=10) 
    108         hbox3.Add(self.labelTextBox, wx.EXPAND | wx.ALL |wx.ALIGN_LEFT , border=10) 
     109        hbox3.Add(labelText, flag= wx.EXPAND | wx.RIGHT |  wx.ALIGN_LEFT, border=10) 
     110        hbox3.Add(self.labelTextBox, wx.EXPAND | wx.RIGHT |wx.ALIGN_LEFT , border=10) 
    109111   
    110112        symbolStaticBoxSizer.Add(hbox1,flag = wx.ALL | wx.EXPAND,border=10) 
     
    154156            self.sizeComboBox.SetSelection(4) 
    155157        self.symbolListBox.SetSelection(self.sorted_sym_dic[symbol]) 
    156         colorname = appearanceDialog.find_key(self.get_color_label(),color) 
     158        colorname = appearanceDialog.find_key(self.parent.get_color_label(),color) 
    157159        self.colorListBox.SetStringSelection(colorname) 
    158160 
     
    170172         
    171173        for color in sortedcolorLabels: 
    172             self.colorListBox.Append(str(color[0])) 
     174             self.colorListBox.Append(str(color[0])) 
    173175  
    174176    def populateSize(self): 
     
    258260        return(size,color,symbol,name) 
    259261 
     262    def onOK(self,e): 
     263        self.okay_clicked = True 
     264 
     265        self.Close() 
Note: See TracChangeset for help on using the changeset viewer.