|
@@ -1879,101 +1879,6 @@ class AttributeManager(wx.Frame):
|
|
|
self.manageLayerBook.modifyLayerWidgets['layer'][1].SetItems(listOfLayers)
|
|
|
self.manageLayerBook.OnChangeLayer(event=None)
|
|
|
|
|
|
-# def OnMapClick(self, event):
|
|
|
-# """
|
|
|
-# Gets coordinates from mouse clicking on display window
|
|
|
-# """
|
|
|
-# Debug.msg(3, "VirtualAttributeList.OnMapClick()")
|
|
|
-
|
|
|
-# # map coordinates
|
|
|
-# x, y = self.mapdisp.MapWindow.Pixel2Cell(event.GetPositionTuple()[:])
|
|
|
-
|
|
|
-# category = ""
|
|
|
-# for line in os.popen("v.what east_north=%f,%f map=%s" %\
|
|
|
-# (x,y,self.vectmap)).readlines():
|
|
|
-# if "Category:" in line:
|
|
|
-# category = line.strip().split(" ")[1]
|
|
|
-
|
|
|
-# #print category
|
|
|
-
|
|
|
-# for idx in range(self.GetItemCount()):
|
|
|
-# item = self.GetItem(idx, 0)
|
|
|
-# if item.GetText() == category:
|
|
|
-# #print idx
|
|
|
-# # self.Select(idx,True)
|
|
|
-# self.EnsureVisible( idx )
|
|
|
-# self.SetItemState(idx, wx.LIST_STATE_SELECTED, wx.LIST_STATE_SELECTED)
|
|
|
-# else:
|
|
|
-# # self.SetItemState(idx, wx.LIST_STATE_DESELECTED, wx.LIST_STATE_DESELECTED)
|
|
|
-# self.Select(idx,False)
|
|
|
-
|
|
|
-
|
|
|
-# # try:
|
|
|
-# # os.environ["GRASS_MESSAGE_FORMAT"] = "gui"
|
|
|
-# # cmd = "v.what -a east_north=%d,%d distance=%d map=%@%" % (x,y,100,self.tablename, self.self.mapset)
|
|
|
-# # self.cmd_output.write(cmd+"\n----------\n")
|
|
|
-# # p = Popen(cmd +" --verbose", shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=True)
|
|
|
-# #
|
|
|
-# # oline = p.stderr.readline()
|
|
|
-# # while oline:
|
|
|
-# # oline = oline.strip()
|
|
|
-# # oline = p.stderr.readline()
|
|
|
-# # if oline.find("GRASS_INFO_MESSAGE")>-1:
|
|
|
-# # self.cmd_output.write(string.split(oline,maxsplit=1)[1]+"\n")
|
|
|
-# # elif oline.find("GRASS_INFO_WARNING")>-1:
|
|
|
-# # self.cmd_output.write("WARNING: "+string.split(oline,maxsplit=1)[1]+"\n")
|
|
|
-# # elif oline.find("GRASS_INFO_ERROR")>-1:
|
|
|
-# # self.cmd_output.write("ERROR: "+string.split(oline,maxsplit=1)[1]+"\n")
|
|
|
-# #
|
|
|
-# # oline = p.stdout.readline()
|
|
|
-# # while oline:
|
|
|
-# # oline = oline.strip()
|
|
|
-# # self.cmd_output.write(oline+"\n")
|
|
|
-# # print oline+"\n"
|
|
|
-# # print >> sys.stderr, oline
|
|
|
-# # oline = p.stdout.readline()
|
|
|
-# #
|
|
|
-# # if p.stdout < 0:
|
|
|
-# # print >> sys.stderr, "Child was terminated by signal", p.stdout
|
|
|
-# # elif p.stdout > 0:
|
|
|
-# # print >> sys.stderr, p.stdout
|
|
|
-# # pass
|
|
|
-# # except OSError, e:
|
|
|
-# # print >> sys.stderr, "Execution failed:", e
|
|
|
-
|
|
|
-# # try:
|
|
|
-# # os.environ["GRASS_MESSAGE_FORMAT"] = "gui"
|
|
|
-# # cmd = "v.what -a east_north=%d,%d distance=%d map=%@%" % (x,y,100,self.tablename, self.self.mapset)
|
|
|
-# # self.cmd_output.write(cmd+"\n----------\n")
|
|
|
-# # p = Popen(cmd +" --verbose", shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=True)
|
|
|
-# #
|
|
|
-# # oline = p.stderr.readline()
|
|
|
-# # while oline:
|
|
|
-# # oline = oline.strip()
|
|
|
-# # oline = p.stderr.readline()
|
|
|
-# # if oline.find("GRASS_INFO_MESSAGE")>-1:
|
|
|
-# # self.cmd_output.write(string.split(oline,maxsplit=1)[1]+"\n")
|
|
|
-# # elif oline.find("GRASS_INFO_WARNING")>-1:
|
|
|
-# # self.cmd_output.write("WARNING: "+string.split(oline,maxsplit=1)[1]+"\n")
|
|
|
-# # elif oline.find("GRASS_INFO_ERROR")>-1:
|
|
|
-# # self.cmd_output.write("ERROR: "+string.split(oline,maxsplit=1)[1]+"\n")
|
|
|
-# #
|
|
|
-# # oline = p.stdout.readline()
|
|
|
-# # while oline:
|
|
|
-# # oline = oline.strip()
|
|
|
-# # self.cmd_output.write(oline+"\n")
|
|
|
-# # print oline+"\n"
|
|
|
-# # print >> sys.stderr, oline
|
|
|
-# # oline = p.stdout.readline()
|
|
|
-# #
|
|
|
-# # if p.stdout < 0:
|
|
|
-# # print >> sys.stderr, "Child was terminated by signal", p.stdout
|
|
|
-# # elif p.stdout > 0:
|
|
|
-# # print >> sys.stderr, p.stdout
|
|
|
-# # pass
|
|
|
-# # except OSError, e:
|
|
|
-# # print >> sys.stderr, "Execution failed:", e
|
|
|
-
|
|
|
class TableListCtrl(wx.ListCtrl,
|
|
|
listmix.ListCtrlAutoWidthMixin):
|
|
|
# listmix.TextEditMixin):
|