Spot now uses the custom grid as it should. Allowing to step
by one foundry step.
This commit is contained in:
parent
cea214de5e
commit
0c88f99622
|
@ -230,7 +230,7 @@ namespace Hurricane {
|
|||
DbU::Unit DbU::getOnCustomGrid ( DbU::Unit u, DbU::Unit step, SnapMode mode )
|
||||
{
|
||||
DbU::Unit inferior = ( u / step ) * step;
|
||||
DbU::Unit modulo = abs ( u % step );
|
||||
DbU::Unit modulo = ( u % step );
|
||||
|
||||
if ( !modulo ) return u;
|
||||
if ( modulo < 0 ) inferior -= step;
|
||||
|
|
|
@ -178,8 +178,8 @@ namespace Hurricane {
|
|||
QPoint CellWidget::Spot::computeSpotPoint ( const QPoint& screenPoint )
|
||||
{
|
||||
Point mousePoint = _cellWidget->screenToDbuPoint ( screenPoint );
|
||||
Point spotPoint = Point ( _cellWidget->_onSnapGrid(mousePoint.getX())
|
||||
, _cellWidget->_onSnapGrid(mousePoint.getY())
|
||||
Point spotPoint = Point ( _cellWidget->_onCursorGrid(mousePoint.getX())
|
||||
, _cellWidget->_onCursorGrid(mousePoint.getY())
|
||||
);
|
||||
|
||||
return _cellWidget->dbuToScreenPoint(spotPoint);
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
install ( TARGETS Hurricane-static DESTINATION /lib/python )
|
||||
else ( BUILD_STATIC )
|
||||
add_library ( isobar SHARED ${sources} )
|
||||
target_link_libraries ( isobar hurricane ${PYTHON_LIBRARIES} )
|
||||
target_link_libraries ( isobar hurricane ${PYTHON_LIBRARIES} -lutil )
|
||||
|
||||
add_library ( Hurricane MODULE ${sources} )
|
||||
set_target_properties ( Hurricane PROPERTIES
|
||||
|
|
Loading…
Reference in New Issue