[GRASS-SVN] r34848 - in grass/branches/develbranch_6/gui/wxpython:
gui_modules vdigit
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Dec 13 10:37:57 EST 2008
Author: martinl
Date: 2008-12-13 10:37:56 -0500 (Sat, 13 Dec 2008)
New Revision: 34848
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py
grass/branches/develbranch_6/gui/wxpython/vdigit/cats.cpp
grass/branches/develbranch_6/gui/wxpython/vdigit/digit.cpp
grass/branches/develbranch_6/gui/wxpython/vdigit/driver.cpp
grass/branches/develbranch_6/gui/wxpython/vdigit/driver.h
grass/branches/develbranch_6/gui/wxpython/vdigit/driver_draw.cpp
grass/branches/develbranch_6/gui/wxpython/vdigit/driver_select.cpp
grass/branches/develbranch_6/gui/wxpython/vdigit/line.cpp
grass/branches/develbranch_6/gui/wxpython/vdigit/vertex.cpp
Log:
wxGUI: delete selected features from attribute manager (trac #314)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py 2008-12-13 10:51:59 UTC (rev 34847)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py 2008-12-13 15:37:56 UTC (rev 34848)
@@ -940,6 +940,7 @@
self.popupDataID8 = wx.NewId()
self.popupDataID9 = wx.NewId()
self.popupDataID10 = wx.NewId()
+ self.popupDataID11 = wx.NewId()
self.Bind(wx.EVT_MENU, self.OnDataItemEdit, id=self.popupDataID1)
self.Bind(wx.EVT_MENU, self.OnDataItemAdd, id=self.popupDataID2)
@@ -950,6 +951,7 @@
self.Bind(wx.EVT_MENU, self.OnDataDrawSelected, id=self.popupDataID7)
self.Bind(wx.EVT_MENU, self.OnDataDrawSelectedZoom, id=self.popupDataID8)
self.Bind(wx.EVT_MENU, self.OnExtractSelected, id=self.popupDataID9)
+ self.Bind(wx.EVT_MENU, self.OnDeleteSelected, id=self.popupDataID11)
self.Bind(wx.EVT_MENU, self.OnDataReload, id=self.popupDataID10)
list = self.FindWindowById(self.layerPage[self.layer]['data'])
@@ -966,15 +968,17 @@
menu.Append(self.popupDataID5, _("Select all"))
menu.Append(self.popupDataID6, _("Deselect all"))
menu.AppendSeparator()
- menu.Append(self.popupDataID7, _("Highlight selected"))
- menu.Append(self.popupDataID8, _("Highlight selected and zoom"))
+ menu.Append(self.popupDataID7, _("Highlight selected features"))
+ menu.Append(self.popupDataID8, _("Highlight selected features and zoom"))
if not self.map or len(list.GetSelectedItems()) == 0:
menu.Enable(self.popupDataID7, False)
menu.Enable(self.popupDataID8, False)
- menu.Append(self.popupDataID9, _("Extract selected"))
+ menu.Append(self.popupDataID9, _("Extract selected features"))
+ menu.Append(self.popupDataID11, _("Delete selected features"))
if list.GetFirstSelected() == -1:
menu.Enable(self.popupDataID3, False)
menu.Enable(self.popupDataID9, False)
+ menu.Enable(self.popupDataID11, False)
menu.AppendSeparator()
menu.Append(self.popupDataID10, _("Reload"))
@@ -1015,7 +1019,7 @@
style=wx.YES_NO | wx.CENTRE)
if deleteDialog != wx.YES:
self.listOfSQLStatements = []
- return
+ return False
# restore maps
i = 0
@@ -1047,7 +1051,7 @@
# submit SQL statements
self.ApplyCommands()
- event.Skip()
+ return True
def OnDataItemDeleteAll(self, event):
"""Delete all items from the list"""
@@ -1864,24 +1868,49 @@
Extract vector objects selected in attribute browse window
to new vector map
"""
-
list = self.FindWindowById(self.layerPage[self.layer]['data'])
# cats = list.selectedCats[:]
cats = list.GetSelectedItems()
if len(cats) == 0:
wx.MessageBox(parent=self,
message=_('Nothing to extract.'),
- caption=_('Extract selected'), style=wx.CENTRE)
+ caption=_('Message'), style=wx.CENTRE)
return
else:
# dialog to get file name
- gdialogs.CreateNewVector(parent=self, title=_('Extract selected'),
+ gdialogs.CreateNewVector(parent=self, title=_('Extract selected features'),
log=self.cmdLog,
cmdDef=(["v.extract",
"input=%s" % self.vectmap,
"list=%s" % utils.ListOfCatsToRange(cats)],
"output"))
+ def OnDeleteSelected(self, event):
+ """
+ Delete vector objects selected in attribute browse window
+ (attribures and geometry)
+ """
+ list = self.FindWindowById(self.layerPage[self.layer]['data'])
+ cats = list.GetSelectedItems()
+ if len(cats) == 0:
+ wx.MessageBox(parent=self,
+ message=_('Nothing to delete.'),
+ caption=_('Message'), style=wx.CENTRE)
+ if self.OnDataItemDelete(None):
+ digitToolbar = self.mapdisplay.toolbars['vdigit']
+ if digitToolbar and digitToolbar.GetLayer() and \
+ digitToolbar.GetLayer().GetName() == self.vectmap:
+ self.mapdisplay.digit.driver.SetSelected(map(int, cats), cats=True)
+ self.mapdisplay.digit.DeleteSelectedLines()
+ else:
+ gcmd.Command(['v.edit',
+ '--q',
+ 'map=%s' % self.vectmap,
+ 'tool=delete',
+ 'cats=%s' % utils.ListOfCatsToRange(cats)])
+
+ self.mapdisplay.MapWindow.UpdateMap(render=True, renderVector=True)
+
def AddQueryMapLayer(self):
"""Redraw a map
Modified: grass/branches/develbranch_6/gui/wxpython/vdigit/cats.cpp
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/vdigit/cats.cpp 2008-12-13 10:51:59 UTC (rev 34847)
+++ grass/branches/develbranch_6/gui/wxpython/vdigit/cats.cpp 2008-12-13 15:37:56 UTC (rev 34848)
@@ -166,14 +166,14 @@
return lc;
}
- if (line_id == -1 && display->selected.values->n_values < 1) {
+ if (line_id == -1 && display->selected.ids->n_values < 1) {
/* GetLineCatsMsg(line_id); */
return lc;
}
line = line_id;
if (line_id == -1) {
- line = display->selected.values->value[0];
+ line = display->selected.ids->value[0];
}
if (!Vect_line_alive(display->mapInfo, line)) {
@@ -224,13 +224,13 @@
return -1;
}
- if (line_id == -1 && display->selected.values->n_values < 1) {
+ if (line_id == -1 && display->selected.ids->n_values < 1) {
display->GetLineCatsMsg(line_id);
return -1;
}
if (line_id == -1) {
- line = display->selected.values->value[0];
+ line = display->selected.ids->value[0];
}
else {
line = line_id;
@@ -264,7 +264,7 @@
}
/* register changeset */
- // AddActionToChangeset(changesets.size(), REWRITE, display->selected.values->value[0]);
+ // AddActionToChangeset(changesets.size(), REWRITE, display->selected.ids->value[0]);
ret = Vect_rewrite_line(display->mapInfo, line, type,
Points, Cats);
@@ -282,7 +282,7 @@
if (line_id == -1) {
/* update line id since the line was rewritten */
- display->selected.values->value[0] = ret;
+ display->selected.ids->value[0] = ret;
}
Vect_destroy_line_struct(Points);
Modified: grass/branches/develbranch_6/gui/wxpython/vdigit/digit.cpp
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/vdigit/digit.cpp 2008-12-13 10:51:59 UTC (rev 34847)
+++ grass/branches/develbranch_6/gui/wxpython/vdigit/digit.cpp 2008-12-13 15:37:56 UTC (rev 34848)
@@ -75,8 +75,8 @@
/* register changeset */
changeset = changesets.size();
- for (int i = 0; i < display->selected.values->n_values; i++) {
- int line = display->selected.values->value[i];
+ for (int i = 0; i < display->selected.ids->n_values; i++) {
+ int line = display->selected.ids->value[i];
if (Vect_line_alive(display->mapInfo, line))
AddActionToChangeset(changeset, DEL, line);
}
@@ -89,8 +89,8 @@
*/
void Digit::AddActionsAfter(int changeset, int nlines)
{
- for (int i = 0; i < display->selected.values->n_values; i++) {
- int line = display->selected.values->value[i];
+ for (int i = 0; i < display->selected.ids->n_values; i++) {
+ int line = display->selected.ids->value[i];
if (Vect_line_alive(display->mapInfo, line)) {
RemoveActionFromChangeset(changeset, DEL, line);
}
Modified: grass/branches/develbranch_6/gui/wxpython/vdigit/driver.cpp
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/vdigit/driver.cpp 2008-12-13 10:51:59 UTC (rev 34847)
+++ grass/branches/develbranch_6/gui/wxpython/vdigit/driver.cpp 2008-12-13 15:37:56 UTC (rev 34848)
@@ -43,8 +43,9 @@
pointsScreen = new wxList();
cats = Vect_new_cats_struct();
- selected.values = Vect_new_list();
- selected.valuesDupl = Vect_new_list();
+ selected.cats = Vect_new_list();
+ selected.ids = Vect_new_list();
+ selected.idsDupl = Vect_new_list();
drawSegments = false;
@@ -72,8 +73,9 @@
Vect_destroy_line_struct(points);
delete pointsScreen;
Vect_destroy_cats_struct(cats);
- Vect_destroy_list(selected.values);
- Vect_destroy_list(selected.valuesDupl);
+ Vect_destroy_list(selected.cats);
+ Vect_destroy_list(selected.ids);
+ Vect_destroy_list(selected.idsDupl);
}
/**
@@ -392,8 +394,8 @@
std::cerr << "selected: ";
- for (int i = 0; i < selected.values->n_values; i++) {
- std::cerr << selected.values->value[i] << " ";
+ for (int i = 0; i < selected.ids->n_values; i++) {
+ std::cerr << selected.ids->value[i] << " ";
}
std::cerr << std::endl;
Modified: grass/branches/develbranch_6/gui/wxpython/vdigit/driver.h
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/vdigit/driver.h 2008-12-13 10:51:59 UTC (rev 34847)
+++ grass/branches/develbranch_6/gui/wxpython/vdigit/driver.h 2008-12-13 15:37:56 UTC (rev 34848)
@@ -48,10 +48,9 @@
*/
struct _selected {
- struct ilist *values;
- struct ilist *valuesDupl;
-
- bool isId; /* id or cat ? */
+ struct ilist *cats;
+ struct ilist *ids;
+ struct ilist *idsDupl;
} selected;
bool drawSelected;
Modified: grass/branches/develbranch_6/gui/wxpython/vdigit/driver_draw.cpp
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/vdigit/driver_draw.cpp 2008-12-13 10:51:59 UTC (rev 34847)
+++ grass/branches/develbranch_6/gui/wxpython/vdigit/driver_draw.cpp 2008-12-13 15:37:56 UTC (rev 34848)
@@ -170,8 +170,11 @@
dcTmp->EndDrawing();
dc->EndDrawing();
- // PrintIds();
-
+ /* reset list of selected features by cat
+ -> list of ids - see IsSelected()
+ */
+ Vect_reset_list(selected.cats);
+
Vect_destroy_list(listLines);
return listLines->n_values;
@@ -230,13 +233,6 @@
// read line
type = Vect_read_line (mapInfo, points, cats, line);
- // add ids
- // -> node1, line1, vertex1, line2, ..., node2
- // struct lineDesc desc = {points->n_points, dcId};
- // ids[line] = desc;
- // update id for next line
- // dcId += points->n_points * 2 - 1;
-
pdc = NULL;
if (IsSelected(line)) { // line selected ?
Modified: grass/branches/develbranch_6/gui/wxpython/vdigit/driver_select.cpp
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/vdigit/driver_select.cpp 2008-12-13 10:51:59 UTC (rev 34847)
+++ grass/branches/develbranch_6/gui/wxpython/vdigit/driver_select.cpp 2008-12-13 15:37:56 UTC (rev 34848)
@@ -49,9 +49,10 @@
drawSegments = drawSeg;
drawSelected = true;
+
+ /* select by ids */
+ Vect_reset_list(selected.cats);
- selected.isId = true;
-
list = Vect_new_list();
bbox = Vect_new_line_struct();
@@ -83,10 +84,10 @@
}
if (!IsSelected(line)) {
- Vect_list_append(selected.values, line);
+ Vect_list_append(selected.ids, line);
}
else {
- Vect_list_delete(selected.values, line);
+ Vect_list_delete(selected.ids, line);
}
}
@@ -122,18 +123,20 @@
found = Vect_new_list();
drawSelected = true;
- selected.isId = true;
+ /* select by ids */
+ Vect_reset_list(selected.cats);
+
line_nearest = Vect_find_line_list(mapInfo, x, y, z,
type, thresh, with_z,
NULL, found);
if (line_nearest > 0) {
if (!IsSelected(line_nearest)) {
- Vect_list_append(selected.values, line_nearest);
+ Vect_list_append(selected.ids, line_nearest);
}
else {
- Vect_list_delete(selected.values, line_nearest);
+ Vect_list_delete(selected.ids, line_nearest);
}
type = Vect_read_line (mapInfo, points, cats, line_nearest);
@@ -151,7 +154,7 @@
for (int i = 0; i < found->n_values; i++) {
line = found->value[i];
if (line != line_nearest) {
- Vect_list_append(selected.values, found->value[i]);
+ Vect_list_append(selected.ids, found->value[i]);
}
}
@@ -160,7 +163,7 @@
for (int i = 0; i < found->n_values; i++) {
line = found->value[i];
if (line != line_nearest && !IsDuplicated(line)) {
- Vect_list_delete(selected.values, line);
+ Vect_list_delete(selected.ids, line);
}
}
}
@@ -185,15 +188,21 @@
*/
bool DisplayDriver::IsSelected(int line, bool force)
{
- if (selected.isId || force) {
- if (Vect_val_in_list(selected.values, line))
+ if (selected.cats->n_values < 1 || force) {
+ /* select by id */
+ if (Vect_val_in_list(selected.ids, line)) {
return true;
+ }
}
- else {
+ else { /* select by cat */
for (int i = 0; i < cats->n_cats; i++) {
if (cats->field[i] == 1 && /* TODO: field */
- Vect_val_in_list(selected.values, cats->cat[i]))
+ Vect_val_in_list(selected.cats, cats->cat[i])) {
+ /* remember id
+ -> after drawing all features selected.cats is reseted */
+ Vect_list_append(selected.ids, line);
return true;
+ }
}
}
@@ -211,7 +220,7 @@
std::vector<int> DisplayDriver::GetSelected(bool grassId)
{
if (grassId)
- return ListToVector(selected.values);
+ return ListToVector(selected.ids);
std::vector<int> dc_ids;
@@ -221,7 +230,7 @@
else {
// only first selected feature !
int npoints;
- Vect_read_line(mapInfo, points, NULL, selected.values->value[0]);
+ Vect_read_line(mapInfo, points, NULL, selected.ids->value[0]);
npoints = points->n_points;
// node - segment - vertex - segment - node
for (int i = 1; i < 2 * npoints; i++) {
@@ -239,9 +248,9 @@
id = 1;
- for (int is = 0; is < selected.values->n_values; is++) {
- if (Vect_read_line(mapInfo, points, NULL, selected.values->value[is]) < 0) {
- ReadLineMsg(selected.values->value[is]);
+ for (int is = 0; is < selected.ids->n_values; is++) {
+ if (Vect_read_line(mapInfo, points, NULL, selected.ids->value[is]) < 0) {
+ ReadLineMsg(selected.ids->value[is]);
return ret;
}
@@ -276,29 +285,29 @@
APoints = Vect_new_line_struct();
BPoints = Vect_new_line_struct();
- Vect_reset_list(selected.valuesDupl);
+ Vect_reset_list(selected.idsDupl);
- for (int i = 0; i < selected.values->n_values; i++) {
- line = selected.values->value[i];
+ for (int i = 0; i < selected.ids->n_values; i++) {
+ line = selected.ids->value[i];
if (IsDuplicated(line))
continue;
Vect_read_line(mapInfo, APoints, NULL, line);
- for (int j = 0; j < selected.values->n_values; j++) {
- if (i == j || IsDuplicated(selected.values->value[j]))
+ for (int j = 0; j < selected.ids->n_values; j++) {
+ if (i == j || IsDuplicated(selected.ids->value[j]))
continue;
- Vect_read_line(mapInfo, BPoints, NULL, selected.values->value[j]);
+ Vect_read_line(mapInfo, BPoints, NULL, selected.ids->value[j]);
if (Vect_line_check_duplicate (APoints, BPoints, WITHOUT_Z)) {
if (ids.find(i) == ids.end()) {
ids[i] = std::vector<int> ();
- ids[i].push_back(selected.values->value[i]);
- Vect_list_append(selected.valuesDupl, selected.values->value[i]);
+ ids[i].push_back(selected.ids->value[i]);
+ Vect_list_append(selected.idsDupl, selected.ids->value[i]);
}
- ids[i].push_back(selected.values->value[j]);
- Vect_list_append(selected.valuesDupl, selected.values->value[j]);
+ ids[i].push_back(selected.ids->value[j]);
+ Vect_list_append(selected.idsDupl, selected.ids->value[j]);
}
}
}
@@ -319,7 +328,7 @@
*/
bool DisplayDriver::IsDuplicated(int line)
{
- if (Vect_val_in_list(selected.valuesDupl, line))
+ if (Vect_val_in_list(selected.idsDupl, line))
return true;
return false;
@@ -337,11 +346,12 @@
{
drawSelected = true;
- VectorToList(selected.values, id);
+ if (cat)
+ VectorToList(selected.cats, id);
+ else
+ VectorToList(selected.ids, id);
- selected.isId = !cat;
-
- if (selected.values->n_values <= 0)
+ if (id.size() < 1)
drawSegments = false;
return 1;
@@ -363,7 +373,7 @@
for (std::vector<int>::const_iterator i = id.begin(), e = id.end();
i != e; ++i) {
if (IsSelected(*i)) {
- Vect_list_delete(selected.values, *i);
+ Vect_list_delete(selected.ids, *i);
}
if (settings.highlightDupl.enabled && IsDuplicated(*i)) {
checkForDupl = true;
@@ -374,7 +384,7 @@
GetDuplicates();
}
- return selected.values->n_values;
+ return selected.ids->n_values;
}
/**
@@ -402,11 +412,11 @@
std::vector<int> returnId;
// only one object can be selected
- if (selected.values->n_values != 1 || !drawSegments)
+ if (selected.ids->n_values != 1 || !drawSegments)
return returnId;
startId = 1;
- line = selected.values->value[0];
+ line = selected.ids->value[0];
type = Vect_read_line (mapInfo, points, cats, line);
@@ -483,13 +493,13 @@
G_zero(®ion_box, sizeof(region_box));
- if (!selected.isId) { /* -> cats */
+ if (selected.cats->n_values > 0) { /* -> cats */
list = Vect_new_list();
list_tmp = Vect_new_list();
/* can't use here
*
Vect_cidx_find_all(mapInfo, 1, GV_POINTS | GV_LINES,
- selected.values->value[i],
+ selected.ids->value[i],
list_tmp);
*/
int type;
@@ -501,8 +511,8 @@
found = false;
for (int i = 0; i < cats->n_cats && !found; i++) {
- for (int j = 0; j < selected.values->n_values && !found; j++) {
- if (cats->cat[i] == selected.values->value[j])
+ for (int j = 0; j < selected.ids->n_values && !found; j++) {
+ if (cats->cat[i] == selected.ids->value[j])
found = true;
}
}
@@ -511,7 +521,7 @@
}
}
else {
- list = selected.values;
+ list = selected.ids;
}
nareas = Vect_get_num_areas(mapInfo);
@@ -536,7 +546,7 @@
}
}
- if (list && list != selected.values) {
+ if (list && list != selected.ids) {
Vect_destroy_list(list);
}
if (list_tmp)
Modified: grass/branches/develbranch_6/gui/wxpython/vdigit/line.cpp
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/vdigit/line.cpp 2008-12-13 10:51:59 UTC (rev 34847)
+++ grass/branches/develbranch_6/gui/wxpython/vdigit/line.cpp 2008-12-13 15:37:56 UTC (rev 34848)
@@ -302,7 +302,7 @@
changeset = AddActionsBefore();
- ret = Vedit_split_lines(display->mapInfo, display->selected.values,
+ ret = Vedit_split_lines(display->mapInfo, display->selected.ids,
point, thresh, list);
if (ret > 0) {
@@ -346,10 +346,10 @@
if (delete_records) {
Cats = Vect_new_cats_struct();
Cats_del = Vect_new_cats_struct();
- for (int i = 0; i < display->selected.values->n_values; i++) {
- if (Vect_read_line(display->mapInfo, NULL, Cats, display->selected.values->value[i]) < 0) {
+ for (int i = 0; i < display->selected.ids->n_values; i++) {
+ if (Vect_read_line(display->mapInfo, NULL, Cats, display->selected.ids->value[i]) < 0) {
Vect_destroy_cats_struct(Cats_del);
- display->ReadLineMsg(display->selected.values->value[i]);
+ display->ReadLineMsg(display->selected.ids->value[i]);
return -1;
}
for (int j = 0; j < Cats->n_cats; j++) {
@@ -377,9 +377,10 @@
/* register changeset */
changeset = AddActionsBefore();
+
+ ret = Vedit_delete_lines(display->mapInfo, display->selected.ids);
+ Vect_reset_list(display->selected.ids);
- ret = Vedit_delete_lines(display->mapInfo, display->selected.values);
-
if (ret > 0 && delete_records) {
struct field_info *fi;
char buf[GSQL_MAX];
@@ -490,7 +491,7 @@
changeset = AddActionsBefore();
ret = Vedit_move_lines(display->mapInfo, BgMap, nbgmaps,
- display->selected.values,
+ display->selected.ids,
move_x, move_y, move_z,
snap, thresh);
@@ -536,7 +537,7 @@
/* register changeset */
changeset = AddActionsBefore();
- ret = Vedit_flip_lines(display->mapInfo, display->selected.values);
+ ret = Vedit_flip_lines(display->mapInfo, display->selected.ids);
if (ret > 0) {
AddActionsAfter(changeset, nlines);
@@ -568,7 +569,7 @@
changeset = AddActionsBefore();
- ret = Vedit_merge_lines(display->mapInfo, display->selected.values);
+ ret = Vedit_merge_lines(display->mapInfo, display->selected.ids);
if (ret > 0) {
AddActionsAfter(changeset, nlines);
@@ -602,7 +603,7 @@
changeset = AddActionsBefore();
- ret = Vect_break_lines_list(display->mapInfo, display->selected.values, NULL,
+ ret = Vect_break_lines_list(display->mapInfo, display->selected.ids, NULL,
GV_LINES, NULL);
if (ret > 0) {
@@ -638,7 +639,7 @@
changeset = AddActionsBefore();
- Vect_snap_lines_list (display->mapInfo, display->selected.values,
+ Vect_snap_lines_list (display->mapInfo, display->selected.ids,
thresh, NULL);
if (nlines < Vect_get_num_lines(display->mapInfo)) {
@@ -672,7 +673,7 @@
/* register changeset */
changeset = AddActionsBefore();
- ret = Vedit_connect_lines(display->mapInfo, display->selected.values,
+ ret = Vedit_connect_lines(display->mapInfo, display->selected.ids,
thresh);
if (ret > 0) {
@@ -715,7 +716,7 @@
/* register changeset */
changeset = AddActionsBefore();
- ret = Vedit_bulk_labeling (display->mapInfo, display->selected.values,
+ ret = Vedit_bulk_labeling (display->mapInfo, display->selected.ids,
x1, y1, x2, y2, start, step);
if (ret > 0) {
@@ -767,7 +768,7 @@
}
}
else {
- list = display->selected.values;
+ list = display->selected.ids;
}
nlines = Vect_get_num_lines(display->mapInfo);
@@ -790,7 +791,7 @@
BreakLineAtIntersection(nlines + i, NULL, changeset);
}
- if (list != display->selected.values) {
+ if (list != display->selected.ids) {
Vect_destroy_list(list);
}
@@ -877,7 +878,7 @@
/* register changeset */
changeset = AddActionsBefore();
- ret = Vedit_chtype_lines (display->mapInfo, display->selected.values);
+ ret = Vedit_chtype_lines (display->mapInfo, display->selected.ids);
if(ret > 0) {
AddActionsAfter(changeset, nlines);
Modified: grass/branches/develbranch_6/gui/wxpython/vdigit/vertex.cpp
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/vdigit/vertex.cpp 2008-12-13 10:51:59 UTC (rev 34847)
+++ grass/branches/develbranch_6/gui/wxpython/vdigit/vertex.cpp 2008-12-13 15:37:56 UTC (rev 34848)
@@ -50,7 +50,7 @@
return -1;
}
- if (display->selected.values->n_values != 1)
+ if (display->selected.ids->n_values != 1)
return 0;
BgMap = NULL;
@@ -75,7 +75,7 @@
/* move only first found vertex in bbox */
ret = Vedit_move_vertex(display->mapInfo, BgMap, nbgmaps,
- display->selected.values,
+ display->selected.ids,
point, thresh_coords, thresh_snap,
move_x, move_y, move_z,
1, snap);
@@ -125,7 +125,7 @@
return -1;
}
- if (display->selected.values->n_values != 1)
+ if (display->selected.ids->n_values != 1)
return 0;
point = Vect_new_line_struct();
@@ -136,11 +136,11 @@
changeset = AddActionsBefore();
if (add) {
- ret = Vedit_add_vertex(display->mapInfo, display->selected.values,
+ ret = Vedit_add_vertex(display->mapInfo, display->selected.ids,
point, thresh);
}
else {
- ret = Vedit_remove_vertex(display->mapInfo, display->selected.values,
+ ret = Vedit_remove_vertex(display->mapInfo, display->selected.ids,
point, thresh);
}
More information about the grass-commit
mailing list