Opened 12 years ago

Closed 12 years ago

#29 closed enhancement (fixed)

moving of vector object by mouse

Reported by: zanollim Owned by: martinl
Priority: major Milestone: 6.4.0
Component: Python Version: svn-trunk
Keywords: wxgui, digitization Cc: grass-dev@…
CPU: Unspecified Platform: Unspecified

Description

when moving a vector object by mouse, the object isn't exactly below the pointer (especially moving points) and when I click on the new position, the object isn't placed correctly.

Change History (10)

comment:1 Changed 12 years ago by martinl

Keywords: wxgui digitization added
Owner: changed from grass-dev@… to martinl
Status: newassigned

It should be fixed now, r29933.

Can you confirm it?

Martin

comment:2 Changed 12 years ago by martinl

Cc: grass-dev@… added

comment:3 Changed 12 years ago by zanollim

Now I click on the 'Move feature(s)' tool and
when I try to select a feature with the mouse,
I see this error and the feature isn't selected:

Traceback (most recent call last):
  File "/usr/src/grass_trunk/dist.i686-pc-linux-gnu/etc/wx/gui_modules/mapdisp.py", line 818, in MouseActions
    self.OnLeftUp(event)
  File "/usr/src/grass_trunk/dist.i686-pc-linux-gnu/etc/wx/gui_modules/mapdisp.py", line 1214, in OnLeftUp
    digitClass.GetSelectType())
  File "/usr/src/grass_trunk/dist.i686-pc-linux-gnu/etc/wx/gui_modules/digit.py", line 1161, in SelectLinesByBox
    nselected = self.__display.SelectLinesByBox(x1, y1, -1.0 * vdigit.PORT_DOUBLE_MAX,
AttributeError: 'module' object has no attribute 'PORT_DOUBLE_MAX'

comment:4 in reply to:  3 ; Changed 12 years ago by martinl

Replying to zanollim:

Now I click on the 'Move feature(s)' tool and
when I try to select a feature with the mouse,
I see this error and the feature isn't selected:

> Traceback (most recent call last):
>   File "/usr/src/grass_trunk/dist.i686-pc-linux-gnu/etc/wx/gui_modules/mapdisp.py", line 818, in MouseActions
>     self.OnLeftUp(event)
>   File "/usr/src/grass_trunk/dist.i686-pc-linux-gnu/etc/wx/gui_modules/mapdisp.py", line 1214, in OnLeftUp
>     digitClass.GetSelectType())
>   File "/usr/src/grass_trunk/dist.i686-pc-linux-gnu/etc/wx/gui_modules/digit.py", line 1161, in SelectLinesByBox
>     nselected = self.__display.SelectLinesByBox(x1, y1, -1.0 * vdigit.PORT_DOUBLE_MAX,
> AttributeError: 'module' object has no attribute 'PORT_DOUBLE_MAX'

You need to recompile vdigit interface since it has been changed (r29940).

cd gui/wxpython/vdigit
make

Restart GUI, then it should work.

Martin

comment:5 in reply to:  4 ; Changed 12 years ago by martinl

Replying to martinl:

You need to recompile vdigit interface since it has been changed (r29940).

> cd gui/wxpython/vdigit
> make

sorry, it should be

cd gui/wxpython/vdigit
make clean
make

You need to recompile it from scratch since some fn prototypes has been changed too.

Martin

comment:6 in reply to:  5 ; Changed 12 years ago by zanollim

Replying to martinl:

sorry, it should be

cd gui/wxpython/vdigit
make clean
make

You need to recompile it from scratch since some fn prototypes has been changed too.

Martin

OK, but now, when compiling vdigit, i see this error:

grass6_wxvdigit_wrap.cxx:1883: error: no type named \u2018category\u2019 in \u2018struct swig::traits<std::pair<int, std::vector<int, std::allocator<int> > > >\u2019
make: *** [OBJ.i686-pc-linux-gnu/grass6_wxvdigit_wrap.o] Error 1

and the component isn't compiled.

comment:7 in reply to:  6 ; Changed 12 years ago by martinl

Replying to zanollim:

Replying to martinl:

sorry, it should be

> > cd gui/wxpython/vdigit
> > make clean
> > make

You need to recompile it from scratch since some fn prototypes has been changed too.

Martin

OK, but now, when compiling vdigit, i see this error:

> grass6_wxvdigit_wrap.cxx:1883: error: no type named \u2018category\u2019 in \u2018struct swig::traits<std::pair<int, std::vector<int, std::allocator<int> > > >\u2019
> make: *** [OBJ.i686-pc-linux-gnu/grass6_wxvdigit_wrap.o] Error 1

and the component isn't compiled.

there are also changes in Makefile (still not stable, sorry). You need to regenerate the Makefile.

cd gui/wxpython/vdigit
make clean
cd ../../..
./configure (or configure.sh if you have own script)
cd gui/wxpython/vdigit
make

Hope now it will work.

Martin

comment:8 in reply to:  7 ; Changed 12 years ago by zanollim

Replying to martinl:

there are also changes in Makefile (still not stable, sorry). You need to regenerate the Makefile.

cd gui/wxpython/vdigit
make clean
cd ../../..
./configure (or configure.sh if you have own script)
cd gui/wxpython/vdigit
make

Hope now it will work.

Martin

Sorry Martin, after the ./configure (terminated with no errors) when I run make the new error is:

make: shared: Command not found
make: [grass6_wxvdigit.so] Error 127 (ignored)

in the Makefile, inside the 'vdigit' folder, I read only this line with the word 'shared':

[...]
LDFLAGS=-shared -fpic -L$(ARCH_LIBDIR) $(VECTLIB) $(GISLIB) $(GDALLIBS) $(VEDITLIB) -lgdi $(WXLDFLAGS)
[...]

comment:9 in reply to:  8 Changed 12 years ago by martinl

Replying to zanollim:

after the ./configure (terminated with no errors) when I run make the new error is:

> make: shared: Command not found
> make: [grass6_wxvdigit.so] Error 127 (ignored)

in the Makefile, inside the 'vdigit' folder, I read only this line with the word 'shared':

> [...]
> LDFLAGS=-shared -fpic -L$(ARCH_LIBDIR) $(VECTLIB) $(GISLIB) $(GDALLIBS) $(VEDITLIB) -lgdi $(WXLDFLAGS)
> [...]

Since this issue is not related to the bug, you can write me personally. I assume you run ./configure without any switches (from the error I can see at least without --with-cxx). I remember I prepared the script for configuration on your machine. It is called configure.sh, you need to run this script or ./configure with all needed switches.

Regards, Martin

comment:10 Changed 12 years ago by zanollim

Resolution: fixed
Status: assignedclosed

Thanks Martin,

I confirm that this bug is fixed.

michele

Note: See TracTickets for help on using tickets.