Changeset 60219


Ignore:
Timestamp:
May 13, 2014, 1:04:41 AM (10 years ago)
Author:
lucadelu
Message:

g.gui.rlisetup: fix problems encountered on windows and clean up

Location:
grass/trunk/gui/wxpython
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • grass/trunk/gui/wxpython/dbmgr/base.py

    r60218 r60219  
    22742274                deleteColumns = "column '%s'" % tlist.GetItemText(item)
    22752275            deleteDialog = wx.MessageBox(parent = self,
    2276                                          message = _("Selected column %s will PERMANENTLY removed "
     2276                                         message = _("Selected %s will PERMANENTLY removed "
    22772277                                                   "from table. Do you want to drop the column?") % \
    22782278                                             (deleteColumns),
  • grass/trunk/gui/wxpython/rlisetup/wizard.py

    r60008 r60219  
    5050        self.parent = parent
    5151        self.wizard = wiz.Wizard(parent=parent, id=wx.ID_ANY,
    52                                  title=_("Create new configuration file for " \
    53                                  "r.li modules"))
     52                                 title=_("Create new configuration file for "
     53                                         "r.li modules"))
    5454        self.rlipath = retRLiPath()
    5555
     
    114114        if self.wizard.RunWizard(self.startpage):
    115115            dlg = wx.MessageDialog(parent=self.parent,
    116                                 message=_("Do you want to create r.li " \
     116                                message=_("Do you want to create r.li "
    117117                                          "configuration file <%s>?") % self.startpage.conf_name,
    118118                                caption=_("Create new r.li configuration file?"),
     
    129129            GMessage(parent=self.parent,
    130130                     message=_("r.li.setup wizard canceled. "
    131                                 "Configuration file not created."))
     131                               "Configuration file not created."))
    132132            self._cleanup()
    133133
     
    184184            self.per_cl = float(self.SF_CL) / float(self.rasterinfo['cols'])
    185185            fil.write("SAMPLINGFRAME %r|%r|%r|%r\n" % (self.per_x, self.per_y,
    186                                                        self.per_rl, self.per_cl))
     186                                                       self.per_rl,
     187                                                       self.per_cl))
    187188        elif self.startpage.region == 'draw':
    188189            self._temp_region()
    189190            tregion = self.drawsampleframepage.tregion
    190191            # should we call this? with align param?
    191             RunCommand('g.region', align=self.startpage.rast,
    192                             n=tregion['n'], s=tregion['s'],
    193                             w=tregion['w'], e=tregion['e'])
     192            RunCommand('g.region', align=self.startpage.rast, n=tregion['n'],
     193                       s=tregion['s'], w=tregion['w'], e=tregion['e'])
    194194            newreg = grass.region()
    195195            self.SF_N = newreg['n']  # set env(SF_N) $n
     
    199199
    200200            self.SF_Y = abs(round(self.gregion['n'] - newreg['n']) / newreg['nsres'])
    201 #                set env(SF_Y) [expr abs(round(($s_n - $n) / $nres)) ] 
     201#                set env(SF_Y) [expr abs(round(($s_n - $n) / $nres)) ]
    202202            self.SF_X = abs(round(self.gregion['w'] - newreg['w']) / newreg['ewres'])
    203 #                set env(SF_X) [expr abs(round(($s_w - $w) / $sres)) ] 
     203#                set env(SF_X) [expr abs(round(($s_w - $w) / $sres)) ]
    204204            self.SF_RL = abs(round(newreg['n'] - newreg['s']) / newreg['nsres'])
    205205#                set env(SF_RL) [expr abs(round(($n - $s) / $nres)) ]
     
    340340            elif self.units.distrtype == 'stratified_random':
    341341                fil.write("STRATIFIEDRANDOM %s|%s\n" % (self.units.distr1,
    342                                                       self.units.distr2))
     342                                                        self.units.distr2))
    343343            elif self.units.distrtype == 'systematic_noncontiguos':
    344344                fil.write("SYSTEMATICNONCONTIGUOUS %s\n" % self.units.distr1)
     
    364364                    tregion = tregion.region
    365365                abs_y = abs(round((float(s_n) - tregion['n']) / tregion['nsres']))
    366                 abs_x = abs(round((float(s_w) - tregion['w']) / tregion['ewres'])) 
     366                abs_x = abs(round((float(s_w) - tregion['w']) / tregion['ewres']))
    367367                abs_rl = abs(round((tregion['n'] - tregion['s']) / tregion['nsres']))
    368368                abs_cl = abs(round((tregion['e'] - tregion['w']) / tregion['ewres']))
     
    438438        #name of output configuration file
    439439        self.newconflabel = wx.StaticText(parent=self, id=wx.ID_ANY,
    440                         label=_('Name for new configuration file to create'))
     440                                          label=_('Name for new configuration file to create'))
    441441
    442442        self.newconftxt = wx.TextCtrl(parent=self, id=wx.ID_ANY,
     
    445445
    446446        self.sizer.Add(item=self.newconflabel, border=5, pos=(0, 0),
    447                         flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
     447                       flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
    448448        self.sizer.Add(item=self.newconftxt, border=5, pos=(0, 1),
    449                         flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
     449                       flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
    450450        #raster
    451451        self.mapsellabel = wx.StaticText(parent=self, id=wx.ID_ANY,
    452                         label=_('Raster map to use to select areas'))
     452                                         label=_('Raster map to use to select areas'))
    453453        self.mapselect = gselect.Select(parent=self, id=wx.ID_ANY,
    454454                                        size=(250, -1), type='cell',
    455455                                        multiple=False)
    456456        self.sizer.Add(item=self.mapsellabel, border=5, pos=(1, 0),
    457                         flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
     457                       flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
    458458        self.sizer.Add(item=self.mapselect, border=5, pos=(1, 1),
    459                         flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
     459                       flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
    460460        #vector
    461461        self.vectsellabel = wx.StaticText(parent=self, id=wx.ID_ANY,
    462                         label=_('Vector map to use to select areas'))
     462                                          label=_('Vector map to use to select areas'))
    463463        self.vectselect = gselect.Select(parent=self, id=wx.ID_ANY,
    464464                                         size=(250, -1), type='vector',
    465465                                         multiple=False)
    466466        self.sizer.Add(item=self.vectsellabel, border=5, pos=(2, 0),
    467                         flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
     467                       flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
    468468        self.sizer.Add(item=self.vectselect, border=5, pos=(2, 1),
    469                         flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
     469                       flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
    470470        #define sampling region
    471471        self.sampling_reg = wx.RadioBox(parent=self, id=wx.ID_ANY,
    472                                       label=" %s " % _("Define sampling " \
    473                                       " region (region for analysis)"),
    474                                       choices=[_('Whole map layer'),
    475                                                _('Keyboard setting'),
    476                                                _('Draw the sampling frame')],
    477                                       majorDimension=1,
    478                                       style=wx.RA_SPECIFY_ROWS)
     472                                        label=" %s " % _("Define sampling "
     473                                                         "region (region for analysis)"),
     474                                        choices=[_('Whole map layer'),
     475                                                 _('Keyboard setting'),
     476                                                 _('Draw the sampling frame')],
     477                                        majorDimension=1,
     478                                        style=wx.RA_SPECIFY_ROWS)
    479479
    480480        self.sizer.Add(item=self.sampling_reg,
    481                         flag=wx.ALIGN_CENTER | wx.ALL | wx.EXPAND, border=5,
    482                         pos=(4, 0), span=(1, 2))
     481                       flag=wx.ALIGN_CENTER | wx.ALL | wx.EXPAND, border=5,
     482                       pos=(4, 0), span=(1, 2))
    483483        #bindings
    484484        self.sampling_reg.Bind(wx.EVT_RADIOBOX, self.OnSampling)
     
    487487        self.vectselect.Bind(wx.EVT_TEXT, self.OnVector)
    488488        self.mapselect.Bind(wx.EVT_TEXT, self.OnRast)
     489        self.Bind(wiz.EVT_WIZARD_PAGE_CHANGED, self.OnEnterPage)
    489490        self.Bind(wiz.EVT_WIZARD_PAGE_CHANGING, self.OnExitPage)
    490491
     
    529530        next.Enable(self.CheckInput())
    530531
     532    def OnEnterPage(self, event):
     533        """!Sets the default values, for the entire map
     534        """
     535        next = wx.FindWindowById(wx.ID_FORWARD)
     536        next.Enable(self.CheckInput())
     537        wx.CallAfter(wx.FindWindowById(wx.ID_FORWARD).Enable, self.CheckInput())
     538
    531539    def CheckInput(self):
    532540        """!Check input fields.
     
    540548    def OnExitPage(self, event=None):
    541549        """!Function during exiting"""
    542         if self.conf_name == '' or self.rast == '':
    543             wx.FindWindowById(wx.ID_FORWARD).Enable(False)
    544         else:
    545             wx.FindWindowById(wx.ID_FORWARD).Enable(True)
     550        next = wx.FindWindowById(wx.ID_FORWARD)
     551        next.Enable(self.CheckInput())
    546552        if event.GetDirection():
    547553            if self.region == 'key':
     
    573579        #column up/left
    574580        self.ColUpLeftlabel = wx.StaticText(parent=self, id=wx.ID_ANY,
    575                                             label=_("Column of upper left " \
    576                                             "corner"))
     581                                            label=_("Column of upper left "
     582                                                    "corner"))
    577583
    578584        self.ColUpLefttxt = wx.TextCtrl(parent=self, id=wx.ID_ANY,
     
    581587
    582588        self.sizer.Add(item=self.ColUpLeftlabel, border=5, pos=(1, 1),
    583                         flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
     589                       flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
    584590        self.sizer.Add(item=self.ColUpLefttxt, border=5, pos=(1, 2),
    585                         flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
     591                       flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
    586592        #row up/left
    587593        self.RowUpLeftlabel = wx.StaticText(parent=self, id=wx.ID_ANY,
     
    605611
    606612        self.sizer.Add(item=self.RowLenlabel, border=5, pos=(3, 1),
    607                         flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
     613                       flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
    608614        self.sizer.Add(item=self.RowLentxt, border=5, pos=(3, 2),
    609                         flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
     615                       flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
    610616
    611617        #column lenght
     
    617623
    618624        self.sizer.Add(item=self.ColLenlabel, border=5, pos=(4, 1),
    619                         flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
     625                       flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
    620626        self.sizer.Add(item=self.ColLentxt, border=5, pos=(4, 2),
    621                         flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
     627                       flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
    622628
    623629        self.ColUpLefttxt.SetValue(self.col_up)
     
    708714            cmdlist = ['d.rast', 'map=%s' % rast]
    709715            map_.AddLayer(ltype='raster', command=cmdlist, active=True,
    710                               name=rast, hidden=False, opacity=1.0,
    711                               render=True)
     716                          name=rast, hidden=False, opacity=1.0, render=True)
    712717
    713718    def OnExitPage(self, event=None):
     
    731736        # toggles
    732737        self.radioBox = wx.RadioBox(parent=self, id=wx.ID_ANY,
    733                                       label="",
    734                                       choices=[_("Whole map layer"),
    735                                                _("Regions"),
    736                                                _("Sample units"),
    737                                                _("Moving window"),
    738                                                _("Select areas from the\n"
    739                                                  "overlayed vector map")],
    740                                       majorDimension=1,
    741                                       style=wx.RA_SPECIFY_COLS | wx.NO_BORDER)
     738                                    label="",
     739                                    choices=[_("Whole map layer"),
     740                                             _("Regions"),
     741                                             _("Sample units"),
     742                                             _("Moving window"),
     743                                             _("Select areas from the\n"
     744                                               "overlayed vector map")],
     745                                    majorDimension=1,
     746                                    style=wx.RA_SPECIFY_COLS | wx.NO_BORDER)
    742747        # layout
    743748        self.sizer.SetVGap(10)
     
    745750
    746751        self.regionBox = wx.RadioBox(parent=self, id=wx.ID_ANY,
    747                         label=_("Choose a method"),
    748                         choices=[_('Use keyboard to enter sampling area'),
    749                         _('Use mouse to draw sampling area')],
    750                         majorDimension=1,
    751                         style=wx.RA_SPECIFY_ROWS)
     752                                     label=_("Choose a method"),
     753                                     choices=[_('Use keyboard to enter sampling area'),
     754                                              _('Use mouse to draw sampling area')],
     755                                     majorDimension=1,
     756                                     style=wx.RA_SPECIFY_ROWS)
    752757        #self.regionBox.EnableItem(1, False)
    753758        self.regionBox.SetItemToolTip(1, _("This option is not supported yet"))
     
    777782        self.areaPanel = wx.Panel(parent=self, id=wx.ID_ANY)
    778783        self.areaText = wx.StaticText(parent=self.areaPanel, id=wx.ID_ANY,
    779                                      label=_('Do you want to check vector areas?'))
     784                                      label=_('Do you want to check vector areas?'))
    780785        self.areaOK = wx.Button(self.areaPanel, wx.ID_ANY, 'Yes', (50, 80))
    781786        self.areaOK.SetToolTip(wx.ToolTip(_("Select if use area by area")))
     
    785790        self.areaNO.Bind(wx.EVT_BUTTON, self.OnVectNo)
    786791        self.areaPanelSizer.Add(self.areaText, flag=wx.ALIGN_CENTER,
    787                                   pos=(0, 0))
    788         self.areaPanelSizer.Add(self.areaOK, flag=wx.ALIGN_CENTER,
    789                                   pos=(0, 1))
    790         self.areaPanelSizer.Add(self.areaNO, flag=wx.ALIGN_CENTER,
    791                                   pos=(0, 2))
     792                                pos=(0, 0))
     793        self.areaPanelSizer.Add(self.areaOK, flag=wx.ALIGN_CENTER, pos=(0, 1))
     794        self.areaPanelSizer.Add(self.areaNO, flag=wx.ALIGN_CENTER, pos=(0, 2))
    792795        self.areaPanel.SetSizer(self.areaPanelSizer)
    793796        self.sizer.Add(self.areaPanel, flag=wx.ALIGN_CENTER, pos=(3, 0))
     
    952955            self.parent.wizard.ShowPage(self.parent.summarypage)
    953956        else:
    954             self.title.SetLabel(_('Draw sample region ' + \
    955                                   str(self.regioncount) + ' of ' + \
     957            self.title.SetLabel(_('Draw sample region ' +
     958                                  str(self.regioncount) + ' of ' +
    956959                                  str(numregions)))
    957960            wx.FindWindowById(wx.ID_FORWARD).Enable(False)
     
    982985            cmdlist = ['d.rast', 'map=%s' % rast]
    983986            map_.AddLayer(ltype='raster', command=cmdlist, active=True,
    984                               name=rast, hidden=False, opacity=1.0,
    985                               render=True)
     987                          name=rast, hidden=False, opacity=1.0, render=True)
    986988
    987989    #def OnExitPage(self, event=None):
     
    10521054                                                    _('Systematic non contiguos'),
    10531055                                                    _('Centered over sites')]
    1054                                             )
    1055         self.distributionBox.EnableItem(5, False)  # disable 'draw' for now
     1056                                          )
    10561057        self.panelSizer.Add(item=self.distributionBox, pos=(3, 0), span=(1, 2),
    10571058                    flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
    10581059
    10591060        self.distr1Label = wx.StaticText(parent=self.scrollPanel, id=wx.ID_ANY,
    1060                                          label=_("What number of Sampling " \
    1061                                          "Units to use?"))
     1061                                         label=_("What number of Sampling "
     1062                                                 "Units to use?"))
    10621063        self.distr1Txt = wx.TextCtrl(parent=self.scrollPanel, id=wx.ID_ANY,
    10631064                                     size=(250, -1))
     
    11751176        self.width = ''
    11761177        self.height = ''
    1177         self.boxtype = ''
     1178        self.boxtype = 'rectangle'
    11781179        # type of shape
    11791180        self.typeBox = wx.RadioBox(parent=self, id=wx.ID_ANY,
    1180                                       label=" %s " % _("Select type of shape"),
    1181                                       choices=[_('Rectangle'), _('Circle'),
    1182                                                ('None')],
    1183                                       majorDimension=1,
    1184                                       style=wx.RA_SPECIFY_COLS)
     1181                                   label=" %s " % _("Select type of shape"),
     1182                                   choices=[_('Rectangle'), _('Circle')],
     1183#                                               ('None')],
     1184                                   majorDimension=1,
     1185                                   style=wx.RA_SPECIFY_COLS)
    11851186
    11861187        self.sizer.Add(self.typeBox, flag=wx.ALIGN_LEFT, pos=(1, 1))
     
    11931194        self.widthTxt = wx.TextCtrl(parent=self, id=wx.ID_ANY, size=(250, -1))
    11941195        self.sizer.Add(item=self.widthLabel, border=5, pos=(2, 1),
    1195                         flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
     1196                       flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
    11961197        self.sizer.Add(item=self.widthTxt, border=5, pos=(2, 2),
    1197                     flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
     1198                       flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
    11981199        self.heightLabel = wx.StaticText(parent=self, id=wx.ID_ANY,
    11991200                                         label=_('Height size (in cells) ?'))
     
    12041205                       flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
    12051206
    1206         self.widthLabels = [_('Width size (in cells)? '),
    1207                             _('What radius size (in meters)? ')]
    1208         self.heightLabels = [_('Height size (in cells)? '),
     1207        self.widthLabels = [_('Width size (in cells) ?'),
     1208                            _('What radius size (in meters) ?')]
     1209        self.heightLabels = [_('Height size (in cells) ?'),
    12091210                             _('Name of the circle mask')]
    12101211
    12111212        self.widthTxt.Bind(wx.EVT_TEXT, self.OnWidth)
    12121213        self.heightTxt.Bind(wx.EVT_TEXT, self.OnHeight)
     1214        wx.FindWindowById(wx.ID_FORWARD).Enable(False)
    12131215
    12141216    def OnEnterPage(self, event):
    12151217        # This is an hack to force the user to choose Rectangle or Circle
    1216         self.typeBox.SetSelection(2),
    1217         self.typeBox.ShowItem(2, False)
     1218#        self.typeBox.SetSelection(2),
     1219#        self.typeBox.ShowItem(2, False)
    12181220        if self.parent.samplingareapage.samplingtype == SamplingType.MVWIN:
    12191221            self.title.SetLabel(_("Set moving windows"))
     
    12291231                self.parent.samplingareapage.samplingtype = SamplingType.KMVWINR
    12301232            else:
    1231                 self.parent.samplingareapage.samplingtype = SamplingType.KUNITSR
     1233                self.parent.samplingareapage.samplingtype = SamplingType.KMVWINC
    12321234            self.boxtype = 'rectangle'
    1233         else:
     1235        elif chosen == 1:
    12341236            if self.parent.samplingareapage.samplingtype == SamplingType.MVWIN:
    12351237                self.parent.samplingareapage.samplingtype = SamplingType.KMVWINC
    12361238            else:
    1237                 self.parent.samplingareapage.samplingtype = SamplingType.KUNITSC
     1239                self.parent.samplingareapage.samplingtype = SamplingType.MMVWINC
    12381240            self.boxtype = 'circle'
     1241
     1242    def CheckInput(self):
     1243        """!Check input fields.
     1244
     1245        @return True if configuration file is given and raster xor vector map,
     1246        False otherwise
     1247        """
     1248        return bool(self.width and bool(self.height))
    12391249
    12401250    def OnWidth(self, event):
    12411251        self.width = event.GetString()
     1252        next = wx.FindWindowById(wx.ID_FORWARD)
     1253        next.Enable(self.CheckInput())
    12421254
    12431255    def OnHeight(self, event):
    12441256        self.height = event.GetString()
     1257        next = wx.FindWindowById(wx.ID_FORWARD)
     1258        next.Enable(self.CheckInput())
    12451259
    12461260
     
    12651279        self.typeBox.ShowItem(2, False)
    12661280        self.sizer.Add(self.typeBox, flag=wx.ALIGN_LEFT, pos=(0, 0),
    1267                             span=(1, 2))
     1281                       span=(1, 2))
    12681282
    12691283        self.regionPanelSizer = wx.GridBagSizer(1, 2)
     
    12821296
    12831297        self.sizer.Add(self.regionNumPanel, flag=wx.ALIGN_LEFT, pos=(1, 0),
    1284                             span=(1, 2))
     1298                       span=(1, 2))
    12851299
    12861300        self.typeBox.Bind(wx.EVT_RADIOBOX, self.OnType)
     
    14091423            cmdlist = ['d.rast', 'map=%s' % rast]
    14101424            map_.AddLayer(ltype='raster', command=cmdlist, active=True,
    1411                               name=rast, hidden=False, opacity=1.0,
    1412                               render=True)
     1425                          name=rast, hidden=False, opacity=1.0, render=True)
    14131426
    14141427    def OnExitPage(self, event=None):
     
    14331446        self.areaPanel = wx.Panel(parent=self, id=wx.ID_ANY)
    14341447        self.areaText = wx.StaticText(parent=self.areaPanel, id=wx.ID_ANY,
    1435                                      label=_('Is this area ok?'))
     1448                                      label=_('Is this area ok?'))
    14361449        self.areaOK = wx.Button(self.areaPanel, wx.ID_ANY, 'Yes', (50, 80))
    14371450        self.areaNO = wx.Button(self.areaPanel, wx.ID_ANY, 'No', (50, 80))
     
    14391452        self.areaNO.Bind(wx.EVT_BUTTON, self.OnNo)
    14401453        self.areaPanelSizer.Add(self.areaText, flag=wx.ALIGN_CENTER,
    1441                                   pos=(0, 0))
     1454                                pos=(0, 0))
    14421455        self.areaPanelSizer.Add(self.areaOK, flag=wx.ALIGN_CENTER,
    1443                                   pos=(0, 1))
     1456                                pos=(0, 1))
    14441457        self.areaPanelSizer.Add(self.areaNO, flag=wx.ALIGN_CENTER,
    1445                                   pos=(0, 2))
     1458                                pos=(0, 2))
    14461459        self.areaPanel.SetSizer(self.areaPanelSizer)
    14471460        self.sizer.Add(self.areaPanel, flag=wx.ALIGN_CENTER, pos=(2, 0))
     
    14791492        cmdlistcat = ['d.rast', 'map=%s' % self.outname]
    14801493        self.map_.AddLayer(ltype='raster', command=cmdlistcat, active=True,
    1481                       name=self.outname, hidden=False, opacity=1.0,
    1482                       render=True)
     1494                           name=self.outname, hidden=False, opacity=1.0,
     1495                           render=True)
    14831496        for l in self.map_.GetListOfLayers():
    14841497            if l.name == self.outname:
     
    15181531            cmdlist = ['d.rast', 'map=%s' % self.rast]
    15191532            self.map_.AddLayer(ltype='raster', command=cmdlist, active=True,
    1520                               name=self.rast, hidden=False, opacity=1.0,
    1521                               render=True)
     1533                               name=self.rast, hidden=False, opacity=1.0,
     1534                               render=True)
    15221535        self.newCat()
    15231536
     
    15451558                                     label="")
    15461559        self.sizer.Add(item=self.conflabel, border=5, pos=(0, 0),
    1547                         flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
     1560                       flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
    15481561        self.sizer.Add(item=self.conftxt, border=5, pos=(0, 1),
    1549                         flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
     1562                       flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
    15501563
    15511564        #raster name
     
    15611574        #vector name
    15621575        self.vectlabel = wx.StaticText(parent=self, id=wx.ID_ANY,
    1563                         label=_('Vector name:'))
    1564         self.vecttxt = wx.StaticText(parent=self, id=wx.ID_ANY,
    1565                         label="")
     1576                                       label=_('Vector name:'))
     1577        self.vecttxt = wx.StaticText(parent=self, id=wx.ID_ANY, label="")
    15661578        self.sizer.Add(item=self.vectlabel, border=5, pos=(2, 0),
    1567                         flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
     1579                       flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
    15681580        self.sizer.Add(item=self.vecttxt, border=5, pos=(2, 1),
    1569                         flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
     1581                       flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
    15701582
    15711583        #region type name
    15721584        self.regionlabel = wx.StaticText(parent=self, id=wx.ID_ANY,
    1573                         label=_('Region type:'))
    1574         self.regiontxt = wx.StaticText(parent=self, id=wx.ID_ANY,
    1575                         label="")
     1585                                         label=_('Region type:'))
     1586        self.regiontxt = wx.StaticText(parent=self, id=wx.ID_ANY, label="")
    15761587        self.sizer.Add(item=self.regionlabel, border=5, pos=(3, 0),
    1577                         flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
     1588                       flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
    15781589        self.sizer.Add(item=self.regiontxt, border=5, pos=(3, 1),
    1579                         flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
     1590                       flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
    15801591
    15811592        #region keyboard
    15821593        self.regionkeylabel = wx.StaticText(parent=self, id=wx.ID_ANY,
    15831594                                            label="")
    1584         self.regionkeytxt = wx.StaticText(parent=self, id=wx.ID_ANY,
    1585                                           label="")
     1595        self.regionkeytxt = wx.StaticText(parent=self, id=wx.ID_ANY, label="")
    15861596        self.sizer.Add(item=self.regionkeylabel, border=5, pos=(4, 0),
    15871597                       flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
     
    15921602        self.samplinglabel = wx.StaticText(parent=self, id=wx.ID_ANY,
    15931603                                           label=_('Sampling area type:'))
    1594         self.samplingtxt = wx.StaticText(parent=self, id=wx.ID_ANY,
    1595                                          label="")
     1604        self.samplingtxt = wx.StaticText(parent=self, id=wx.ID_ANY, label="")
    15961605        self.sizer.Add(item=self.samplinglabel, border=5, pos=(5, 0),
    15971606                       flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
     
    15991608                       flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
    16001609        #shapetype
    1601         self.shapelabel = wx.StaticText(parent=self, id=wx.ID_ANY,
    1602                                         label="")
    1603         self.shapetxt = wx.StaticText(parent=self, id=wx.ID_ANY,
    1604                                       label="")
     1610        self.shapelabel = wx.StaticText(parent=self, id=wx.ID_ANY, label="")
     1611        self.shapetxt = wx.StaticText(parent=self, id=wx.ID_ANY, label="")
    16051612        self.sizer.Add(item=self.shapelabel, border=5, pos=(6, 0),
    16061613                       flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
     
    16091616        #shapedim
    16101617        self.shapewidthlabel = wx.StaticText(parent=self, id=wx.ID_ANY,
    1611                                         label="")
     1618                                             label="")
    16121619        self.shapewidthtxt = wx.StaticText(parent=self, id=wx.ID_ANY,
    1613                                       label="")
     1620                                           label="")
    16141621        self.sizer.Add(item=self.shapewidthlabel, border=5, pos=(7, 0),
    16151622                       flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
     
    16171624                       flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
    16181625        self.shapeheightlabel = wx.StaticText(parent=self, id=wx.ID_ANY,
    1619                                         label="")
     1626                                              label="")
    16201627        self.shapeheighttxt = wx.StaticText(parent=self, id=wx.ID_ANY,
    1621                                       label="")
     1628                                            label="")
    16221629        self.sizer.Add(item=self.shapeheightlabel, border=5, pos=(8, 0),
    16231630                       flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
     
    16391646                       flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
    16401647        self.unitsmorelabel2 = wx.StaticText(parent=self, id=wx.ID_ANY,
    1641                                             label="")
     1648                                             label="")
    16421649        self.unitsmoretxt2 = wx.StaticText(parent=self, id=wx.ID_ANY, label="")
    16431650        self.sizer.Add(item=self.unitsmorelabel2, border=5, pos=(11, 0),
Note: See TracChangeset for help on using the changeset viewer.