From 3647a911117ea08f4f969720a16c58bcc7d4e809 Mon Sep 17 00:00:00 2001 From: Pierre Ratinaud Date: Tue, 25 Nov 2014 00:02:56 +0100 Subject: [PATCH] ... --- Rscripts/Rgraph.R | 13 ++++++++--- analysematrix.py | 3 --- analysetxt.py | 5 +++- dictionnaires/lexique_en.txt | 4 ++-- functions.py | 34 ++++++++++++---------------- guifunct.py | 2 +- iramuteq.py | 54 +++++++++++++++++++++++--------------------- layout.py | 28 ++++++++++++++++------- listlex.py | 27 +++++++++------------- openanalyse.py | 2 +- tabsimi.py | 3 +-- tree.py | 2 ++ 12 files changed, 94 insertions(+), 83 deletions(-) diff --git a/Rscripts/Rgraph.R b/Rscripts/Rgraph.R index 14ce864..8cc1c23 100644 --- a/Rscripts/Rgraph.R +++ b/Rscripts/Rgraph.R @@ -660,12 +660,15 @@ plot.dendro.prof <- function(tree, classes, chisqtable, nbbycl = 60, type.dendro #wordcloud(names(lclasses[[i]]), lclasses[[i]], scale = c(1.5, 0.2), random.order=FALSE, colors = colcloud[i]) yval <- 1.1 plot(0,0,pch='', axes = FALSE) - vcex <- norm.vec(lclasses[[i]], 1.5, 1.5) + vcex <- norm.vec(lclasses[[i]], 1, 2) for (j in 1:length(lclasses[[i]])) { yval <- yval-(strheight( names(lclasses[[i]])[j],cex=vcex[j])+0.02) text(-0.9, yval, names(lclasses[[i]])[j], cex = vcex[j], col = colcloud[i], adj=0) } } + if (!from.cmd) { + dev.off() + } } @@ -686,10 +689,14 @@ plot.dendro.cloud <- function(tree, classes, chisqtable, nbbycl = 60, type.dendr lclasses <- list() for (classe in 1:length(sum.cl)) { ntoplot <- toplot[,classe] + names(ntoplot) <- rownames(toplot) ntoplot <- ntoplot[order(ntoplot, decreasing = TRUE)] ntoplot <- round(ntoplot, 0) - ntoplot <- ntoplot[1:nbbycl] + if (length(toplot) > nbbycl) { + ntoplot <- ntoplot[1:nbbycl] + } ntoplot <- ntoplot[order(ntoplot)] + ntoplot <- which(ntoplot > 0) #ntoplot <- ifelse(length(ntoplot) > nbbycl, ntoplot[1:nbbycl], ntoplot) lclasses[[classe]] <- ntoplot } @@ -714,7 +721,7 @@ plot.dendro.cloud <- function(tree, classes, chisqtable, nbbycl = 60, type.dendr plot.phylo(tree,label.offset=0.1,tip.col=col, type=type.dendro) for (i in rev(tree.order)) { par(mar=c(0,0,1,0),cex=0.9) - wordcloud(names(lclasses[[i]]), lclasses[[i]], scale = c(4, 0.8), random.order=FALSE, colors = colcloud[i]) + wordcloud(names(lclasses[[i]]), lclasses[[i]], scale = c(2.5, 0.5), random.order=FALSE, colors = colcloud[i]) } } diff --git a/analysematrix.py b/analysematrix.py index a89b10e..7e3c93f 100644 --- a/analysematrix.py +++ b/analysematrix.py @@ -25,12 +25,9 @@ class AnalyseMatrix : self.dlg = dlg self.parametres = parametres self.val = False - print self.parametres if not 'pathout' in self.parametres : self.parametres['pathout'] = PathOut(tableau.parametres['originalpath'], analyse_type = self.parametres['type'], dirout = tableau.parametres['pathout']).mkdirout() - print self.parametres self.pathout = PathOut(analyse_type = self.parametres['type'], dirout = self.parametres['pathout']) - print self.pathout.dirout else : self.pathout = PathOut(filename = tableau.parametres['originalpath'], dirout = self.parametres['pathout'], analyse_type = self.parametres['type']) diff --git a/analysetxt.py b/analysetxt.py index 33f7d12..cc99482 100644 --- a/analysetxt.py +++ b/analysetxt.py @@ -78,7 +78,10 @@ class AnalyseText : else : self.val = False if dlg : - self.dlg.Destroy() + try : + self.dlg.Destroy() + except : + pass else : #if isinstance(dlg, wx.ProgressDialog) : # self.dlg.Destroy() diff --git a/dictionnaires/lexique_en.txt b/dictionnaires/lexique_en.txt index 02d5cc0..d10dced 100644 --- a/dictionnaires/lexique_en.txt +++ b/dictionnaires/lexique_en.txt @@ -96476,7 +96476,7 @@ willowwares willowware nom willowy willowy adj willpower willpower nom willpowers willpower nom -wills will nom +wills wills nom wilt wilt nom wilted wilt ver wilting wilt ver @@ -97652,7 +97652,7 @@ your your sw yours yours sw yourself yourself sw yourselves yourselves sw -yous you nom +yous yous nom youth youth nom youthfulness youthfulness nom youthfulnesses youthfulness nom diff --git a/functions.py b/functions.py index f2579f1..758f94b 100644 --- a/functions.py +++ b/functions.py @@ -48,7 +48,9 @@ class TGen : def __getitem__(self, key): return self.tgen[key] - def read(self, path): + def read(self, path = None): + if path is None : + path = self.path with codecs.open(path, 'r', self.encoding) as f : tgen = f.read() tgen = [line.split('\t') for line in tgen.splitlines()] @@ -376,15 +378,8 @@ def treat_line_alceste(i, line) : return [i, int(line[0]), int(line[1]), float(line[2]), float(line[3]), line[6], line[4], line[5]] def ReadProfileAsDico(File, Alceste=False, encoding = sys.getdefaultencoding()): - #print 'lecture des profils : ReadProfileAsDico' - #if Alceste : - # print 'lecture du dictionnaire de type' - # dictlem = {} - # for line in parent.corpus.lem_type_list : - # dictlem[line[0]] = line[1] dictlem = {} print 'lecture des profiles' - #encoding = sys.getdefaultencoding() FileReader = codecs.open(File, 'r', encoding) Filecontent = FileReader.readlines() FileReader.close() @@ -418,17 +413,17 @@ def GetTxtProfile(dictprofile, cluster_size) : return '\n\n'.join(proflist) def formatExceptionInfo(maxTBlevel=5): - cla, exc, trbk = sys.exc_info() - try : - excName = cla.__name__ - except : - excName = 'None' - try: - excArgs = exc.args[0] - except : - excArgs = "" - excTb = traceback.format_tb(trbk, maxTBlevel) - return (excName, excArgs, excTb) + cla, exc, trbk = sys.exc_info() + try : + excName = cla.__name__ + except : + excName = 'None' + try: + excArgs = exc.args[0] + except : + excArgs = "" + excTb = traceback.format_tb(trbk, maxTBlevel) + return (excName, excArgs, excTb) #fonction des etudiants de l'iut @@ -692,7 +687,6 @@ def progressbar(self, maxi) : else : parent = self try : - print '###horrible hack progressbar' maxi = int(maxi) except : maxi = 1 diff --git a/guifunct.py b/guifunct.py index 1641795..67538dc 100644 --- a/guifunct.py +++ b/guifunct.py @@ -58,6 +58,7 @@ def get_table_param(self, filename) : if self.tableau.parametres['colsep'] == 'tabulation' : self.tableau.parametres['colsep'] = '\t' self.tableau.parametres['filetype'] = 'csv' + self.tableau.parametres['encodage'] = dlg.le[dlg.list_encodages.GetSelection()] elif getfileextension(filename) == '.xls' : dlg = dialog.FileOptionDialog(self, -1, _(u"File format").decode('utf8'), sep=False, sheet = True, size=(350, 200), style=wx.DEFAULT_DIALOG_STYLE) @@ -967,7 +968,6 @@ class PrepSimi : param['cexfromchi'] = self.dial.checkit.GetValue() if 'sfromchi' in self.parametres : param['sfromchi'] = self.dial.checki.GetValue() - print param if 'vlabcolor' in self.parametres : param['vlabcolor'] = self.parametres['vlabcolor'] if 'check_bystar' in dir(self.dial) : diff --git a/iramuteq.py b/iramuteq.py index e3ded49..f1dabc0 100644 --- a/iramuteq.py +++ b/iramuteq.py @@ -5,39 +5,36 @@ #License: GNU GPL from optparse import OptionParser +from wx import BusyCursor parser = OptionParser() parser.add_option("-f", "--file", dest="filename", help="open FILE", metavar="FILE", default=False) (options, args) = parser.parse_args() -#print args -#print options import sys reload(sys) import locale import tempfile import codecs import os -import shutil from random import randint -from ConfigParser import * +from ConfigParser import ConfigParser, RawConfigParser import webbrowser import gettext import logging #------------------------------------ import wx -#import wx.aui import wx.lib.agw.aui as aui import wx.html import wx.grid import wx.lib.hyperlink as hl #------------------------------------ -from functions import BugReport, PlaySound, ReadLexique, History, DoConf, ReadDicoAsDico, progressbar +from functions import BugReport, PlaySound, History from checkversion import NewVersion from guifunct import * from tableau import Tableau -from dialog import PrefDialog, CorpusPref +from dialog import PrefDialog from tabfrequence import Frequences, FreqMultiple from tabchi2 import ChiSquare #from tabstudent import MakeStudent @@ -48,18 +45,15 @@ from tabsimi import DoSimi from tabrsimple import InputText from tabverges import Prototypical from tabsplitvar import SplitMatrixFromVar -#from textafcuci import AfcUci from textdist import AnalysePam from textstat import Stat from textaslexico import Lexico from textsimi import SimiTxt, SimiFromCluster from textwordcloud import WordCloud, ClusterCloud from textreinert import Reinert -#from profile_segment import ProfileSegment #from textcheckcorpus import checkcorpus from openanalyse import OpenAnalyse from corpus import Builder, SubBuilder -#from sheet import MySheet from checkinstall import CreateIraDirectory, CheckRPath, FindRPAthWin32, FindRPathNix, CheckRPackages, IsNew, UpgradeConf, CopyConf, RLibsAreInstalled from chemins import RscriptsPath, ConstructConfigPath, ConstructDicoPath, ConstructGlobalPath, PathOut from parse_factiva_xml import ImportFactiva @@ -152,17 +146,18 @@ sys.stdout = printer() ConfigPath = ConstructConfigPath(UserConfigPath) langues = {'french' : wx.LANGUAGE_FRENCH, - 'english' : wx.LANGUAGE_ENGLISH, - 'portuguese' : wx.LANGUAGE_PORTUGUESE, - 'italian' : wx.LANGUAGE_ITALIAN, - 'spanish' : wx.LANGUAGE_SPANISH} + 'english' : wx.LANGUAGE_ENGLISH, + 'portuguese' : wx.LANGUAGE_PORTUGUESE, + 'italian' : wx.LANGUAGE_ITALIAN, + 'spanish' : wx.LANGUAGE_SPANISH + } code_langues = {'french' : 'fr_FR', - 'english' : 'en', - 'portuguese' : 'pt_PT', - 'italian' : 'it_IT', - 'spanish' : 'es_ES' - } + 'english' : 'en', + 'portuguese' : 'pt_PT', + 'italian' : 'it_IT', + 'spanish' : 'es_ES' + } ##################################################################### class IraFrame(wx.Frame): @@ -310,8 +305,8 @@ class IraFrame(wx.Frame): #-------------------------------------------------------------------- self.statusbar = self.CreateStatusBar(2, wx.ST_SIZEGRIP) self.statusbar.SetStatusWidths([-2, -3]) - self.statusbar.SetStatusText(u"Prêt", 0) - self.statusbar.SetStatusText(u"Bienvenue", 1) + self.statusbar.SetStatusText(_(u"Ready"), 0) + self.statusbar.SetStatusText(_(u"Wellcome"), 1) # min size for the frame itself isn't completely done. # see the end up FrameManager::Update() for the test @@ -583,9 +578,16 @@ vous devez signaler le chemin de l'éxecutable de R dans les préférences.""" self.tableau = Tableau(self,os.path.abspath(self.input_path[0])) val = get_table_param(self, self.input_path[0]) if val == wx.ID_OK : - self.tableau.make_content() - OpenAnalyse(self, self.tableau.parametres) - self.tree.OnItemAppend(self.tableau.parametres) + busy = wx.BusyInfo(_("Please wait...").decode('utf8'), self) + wx.SafeYield() + try : + self.tableau.make_content() + OpenAnalyse(self, self.tableau.parametres) + self.tree.OnItemAppend(self.tableau.parametres) + del busy + except : + del busy + BugReport(self) #self.tableau.show_tab() def OnOpenAnalyse(self, event): @@ -965,8 +967,8 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, États-Unis.""" except: BugReport(self) - def SimiCluster(self, parametres = {}, fromprof = False, pathout = '', listactives = [], actives = [], tableau = None) : - DoSimi(self, param = parametres, fromprof = fromprof, listactives = listactives, actives = actives, tableau = tableau) + def SimiCluster(self, parametres = {}, fromprof = False, tableau = None) : + self.analyse_matrix(DoSimi, parametres = parametres, analyse_type = 'simiclustermatrix', matrix = tableau) # def OnSimi(self,evt): # try : diff --git a/layout.py b/layout.py index b362300..8e92228 100644 --- a/layout.py +++ b/layout.py @@ -12,7 +12,7 @@ import wx.lib.agw.labelbook as LB from wx.lib.agw.fmresources import * from chemins import ConstructPathOut, ChdTxtPathOut, FFF, ffr, PathOut, StatTxtPathOut, simipath from ConfigParser import ConfigParser -from functions import ReadProfileAsDico, GetTxtProfile, read_list_file, ReadList, exec_rcode, print_liste, BugReport, DoConf, indices_simi, check_Rresult, progressbar, normpath_win32 +from functions import ReadProfileAsDico, GetTxtProfile, read_list_file, ReadList, exec_rcode, print_liste, BugReport, DoConf, indices_simi, check_Rresult, progressbar, normpath_win32, TGen from ProfList import ProfListctrlPanel from guiparam3d import param3d, simi3d from PrintRScript import write_afc_graph, print_simi3d, PrintSimiScript @@ -659,7 +659,10 @@ class TgenLayout : self.page = page parametres = self.page.parametres ira = wx.GetApp().GetTopWindow() + tgenpath = os.path.join(parametres['pathout'], 'tgen.csv') self.page.tgens, etoiles = ReadList(parametres['tgenspec'], ira.syscoding, sep="\t") + tgen = TGen(path = tgenpath, encoding = parametres['encoding']) + tgen.read() tgentab = False gparent = None for i in range(page.GetPageCount()) : @@ -673,10 +676,12 @@ class TgenLayout : break if tgentab : self.page.tgentab.RefreshData(self.page.tgens) + self.page.tgentab.tgens = tgen.tgen self.page.SetSelection(i) else : self.page.tgentab = ListForSpec(ira, gparent, self.page.tgens, etoiles[1:]) self.page.tgentab.tgen = True + self.page.tgentab.tgens = tgen.tgen self.page.AddPage(self.page.tgentab, u'Tgens Specificities') self.page.SetSelection(self.page.GetPageCount() - 1) @@ -706,7 +711,7 @@ class dolexlayout : self.TabStat.parametres = parametres self.ListPan = ListForSpec(ira, self, self.DictSpec, self.etoiles) if os.path.exists(self.pathout['banalites.csv']) : - self.listban = ListForSpec(ira, self, self.dictban, ['eff'] + self.etoiles) + self.listban = ListForSpec(ira, self, self.dictban, ['eff'] + self.etoiles, usefirst = True) #self.ListPan2 = ListForSpec(sash.rightwin1, self, self.DictSpec, first) self.ListPant = ListForSpec(ira, self, self.DictType, self.etoiles) self.ListPanEff = ListForSpec(ira, self, self.DictEff, self.etoiles) @@ -732,10 +737,6 @@ class dolexlayout : self.TabAFC.AddPage(self.tabAFCTGraph, 'AFC type') self.TabStat.AddPage(self.TabAFC, 'AFC') - - - - ira.nb.AddPage(self.TabStat, u'Spécificités') self.ira = ira @@ -801,9 +802,11 @@ class GraphPanelDendro(wx.Panel): self.panel_1.SetBackgroundColour('white') self.deb = wx.StaticText(self.panel_1, -1, txt) dendro_img = wx.Image(os.path.join(self.ira.images_path,'but_dendro.png'), wx.BITMAP_TYPE_ANY).ConvertToBitmap() + dendro_liste_img = wx.Image(os.path.join(self.ira.images_path,'but_dendro_liste.png'), wx.BITMAP_TYPE_ANY).ConvertToBitmap() + dendro_cloud_img= wx.Image(os.path.join(self.ira.images_path,'but_dendro_cloud.png'), wx.BITMAP_TYPE_ANY).ConvertToBitmap() self.butdendro = wx.BitmapButton(self, -1, dendro_img) - self.butdendrotexte = wx.BitmapButton(self, -1, dendro_img) - self.butdendrocloud = wx.BitmapButton(self, -1, dendro_img) + self.butdendrotexte = wx.BitmapButton(self, -1, dendro_liste_img) + self.butdendrocloud = wx.BitmapButton(self, -1, dendro_cloud_img) for i in range(0,len(list_graph)): if os.path.exists(os.path.join(self.dirout,list_graph[i][0])) : @@ -906,6 +909,9 @@ class GraphPanelDendro(wx.Panel): txt += """ load("%s") source("%s") + if (is.null(debsup)) { + debsup <- debet + } chistable <- chistabletot[1:(debsup-1),] open_file_graph("%s", width=%i, height=%i, svg = %s) plot.dendro.prof(tree.cut1$tree.cl, classes, chistable, nbbycl = 60, type.dendro="%s", bw=%s, lab=NULL) @@ -914,6 +920,9 @@ class GraphPanelDendro(wx.Panel): txt += """ load("%s") source("%s") + if (is.null(debsup)) { + debsup <- debet + } chistable <- chistabletot[1:(debsup-1),] open_file_graph("%s", width=%i, height=%i, svg=%s) plot.dendro.cloud(tree.cut1$tree.cl, classes, chistable, nbbycl = 300, type.dendro="%s", bw=%s, lab=NULL) @@ -923,7 +932,10 @@ class GraphPanelDendro(wx.Panel): tmpfile = tempfile.mktemp() with open(tmpfile, 'w') as f : f.write(txt) + busy = wx.BusyInfo(_("Please wait...").decode('utf8'), self.parent) + wx.SafeYield() error = exec_rcode(self.ira.RPath, tmpfile, wait=True) + del busy check_Rresult(self.ira, error) self.list_graph.append([fileout, 'Dendrogramme CHD1 - %s' % type_dendro]) print_liste(self.dictpathout['liste_graph_chd'], self.list_graph) diff --git a/listlex.py b/listlex.py index ef36372..dea3c98 100644 --- a/listlex.py +++ b/listlex.py @@ -26,7 +26,7 @@ from operator import itemgetter #--------------------------------------------------------------------------- class ListForSpec(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ColumnSorterMixin): - def __init__(self, parent,gparent, dlist = {}, first = [], menu = True): + def __init__(self, parent,gparent, dlist = {}, first = [], usefirst = False, menu = True): #def __init__(self, parent) : wx.ListCtrl.__init__( self, parent, -1, style=wx.LC_REPORT|wx.LC_VIRTUAL|wx.LC_HRULES|wx.LC_VRULES) self.parent=parent @@ -34,7 +34,7 @@ class ListForSpec(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ColumnSor self.dlist=dlist self.first = first self.tgen = False - if 'etoiles' in dir(self.gparent) : + if 'etoiles' in dir(self.gparent) and not usefirst : self.etoiles = self.gparent.etoiles else : self.etoiles = [] @@ -248,15 +248,10 @@ class ListForSpec(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ColumnSor parametres = page.parametres paneff = self.gparent.ListPanEff panchi = self.gparent.ListPan - #etoiles = self.gparent.etoiles et = self.etoiles[ind] - - #if et.startswith(u'X.') : - # et = et.replace(u'X.', u'*') uces = corpus.getucesfrometoile(et) self.la = [panchi.dlist[i][0] for i in range(0, len(panchi.dlist)) if panchi.dlist[i][ind+1] >= minind ] self.lchi = [panchi.dlist[i][ind+1] for i in range(0, len(panchi.dlist)) if panchi.dlist[i][ind+1] >= minind ] - #lfreq = [paneff.dlist[i][ind+1] for i in range(0, len(panchi.dlist)) if panchi.dlist[i][ind+1] >= minind ] if max(self.lchi) == float('inf') : nchi = [] for val in self.lchi : @@ -278,8 +273,6 @@ class ListForSpec(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ColumnSor ucis_txt, ucestxt = doconcorde(corpus, nuces, self.la) items = dict([[i, '
'.join([ucis_txt[i], '
score : %.2f

' % ntab2[i][0], ucestxt[i]])] for i in range(0,len(ucestxt))]) win = message(self, items, u"Segments de texte caractéristiques - %s" % self.first[ind], (900, 600)) - #win.html = '\n' + '
'.join(['
'.join([ucis_txt[i], '
score : %.2f
' % ntab2[i][0], ucestxt[i]]) for i in range(0,len(ucestxt))]) + '\n' - #win.HtmlPage.SetPage(win.html) win.Show(True) def OnPopupTwo(self, event): @@ -289,15 +282,17 @@ class ListForSpec(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ColumnSor corpus = page.corpus else : corpus = self.parent.parent.parent.corpus - item=self.getColumnText(self.GetFirstSelected(), 0) - uce_ok = corpus.getlemuces(item) ira = wx.GetApp().GetTopWindow() - ucis_txt, ucestxt = doconcorde(corpus, uce_ok, [item]) + item=self.getColumnText(self.GetFirstSelected(), 0) + if not self.tgen : + uce_ok = corpus.getlemuces(item) + wordlist = [item] + else : + uce_ok = corpus.gettgenst(self.tgens[item]) + wordlist = [val for val in self.tgens[item] if val in corpus.lems] + ucis_txt, ucestxt = doconcorde(corpus, uce_ok, wordlist) items = dict([[i, '

'.join([ucis_txt[i], ucestxt[i]])] for i in range(0,len(ucestxt))]) - win = message(ira, items, u"Concordancier - %s" % item, (800, 500)) - #win = message(ira, u"Concordancier", (800, 500)) - #win.html = ('\n

%s

' % item) + '
'.join(['
'.join([ucis_txt[i], ucestxt[i]]) for i in range(0,len(ucestxt))]) + '\n' - #win.HtmlPage.SetPage(win.html) + win = message(ira, items, u"Concordancier - %s" % item, (800, 500), uceids = uce_ok) win.Show(True) def getinf(self, txt) : diff --git a/openanalyse.py b/openanalyse.py index 899a0bb..c8089d2 100644 --- a/openanalyse.py +++ b/openanalyse.py @@ -162,7 +162,7 @@ class OpenAnalyse(): WordCloudLayout(self.parent, corpus, self.conf) elif self.conf['type'] == 'reinertmatrix' : OpenCHDS(self.parent, corpus, self.conf, Alceste = False) - elif self.conf['type'] == 'simimatrix' : + elif self.conf['type'] == 'simimatrix' or self.conf['type'] == 'simiclustermatrix': SimiMatLayout(self.parent, corpus, self.conf) elif self.conf['type'] == 'proto' : ProtoLayout(self.parent, corpus, self.conf) diff --git a/tabsimi.py b/tabsimi.py index 9de8067..db34395 100644 --- a/tabsimi.py +++ b/tabsimi.py @@ -30,7 +30,7 @@ class DoSimi(AnalyseMatrix): self.cmd = self.parametres.get('cmd', False) self.dirout = self.parametres.get('pathout', False) if self.fromprof: - self.paramsimi = parametres + self.paramsimi = self.parametres else : self.paramsimi = {'coeff' : 0, 'layout' : 2, @@ -109,7 +109,6 @@ class DoSimi(AnalyseMatrix): #self.parametres['type'] = 'simimatrix' if not self.pathout : self.parametres['pathout'] = ConstructPathOut(self.parametres['pathout'], 'SimiMatrix') - print self.parametres['pathout'] else : self.parametres['pathout'] = self.dirout self.pathout.createdir(self.parametres['pathout']) diff --git a/tree.py b/tree.py index 532457f..6d0945f 100644 --- a/tree.py +++ b/tree.py @@ -127,6 +127,7 @@ class LeftTree(CT.CustomTreeCtrl): self.ild['chi2'] = self.il.Add(wx.Image(os.path.join(self.parent.images_path,'chi2.png'), wx.BITMAP_TYPE_PNG).Scale(16,16).ConvertToBitmap()) self.ild['reinertmatrix'] = self.il.Add(wx.Image(os.path.join(self.parent.images_path,'reinertmatrix.png'), wx.BITMAP_TYPE_PNG).Scale(16,16).ConvertToBitmap()) self.ild['simimatrix'] = self.il.Add(wx.Image(os.path.join(self.parent.images_path,'simimatrix.png'), wx.BITMAP_TYPE_PNG).Scale(16,16).ConvertToBitmap()) + self.ild['simiclustermatrix'] = self.il.Add(wx.Image(os.path.join(self.parent.images_path,'simimatrix.png'), wx.BITMAP_TYPE_PNG).Scale(16,16).ConvertToBitmap()) self.ild['proto'] = self.il.Add(wx.Image(os.path.join(self.parent.images_path,'proto.png'), wx.BITMAP_TYPE_PNG).Scale(16,16).ConvertToBitmap()) self.SetImageList(self.il) @@ -970,6 +971,7 @@ class LeftTree(CT.CustomTreeCtrl): if select : self.history.addtab(item) self.SetItemBold(child, True) + self.SelectItem(child) #dlg = wx.TextEntryDialog(self, "Please Enter The New Item Name", 'Item Naming', 'Python') -- 2.7.4