kopia lustrzana https://github.com/inkstitch/inkstitch
fix manual stitch and add debugging support (#339)
* add debugging support using pydev * fix: don't add tie stitches for manual stitch * fix stylepull/347/head
rodzic
3e6704e5c0
commit
d9525968a2
|
@ -9,3 +9,7 @@ build/
|
|||
locales/
|
||||
/inx/
|
||||
messages.po
|
||||
/DEBUG
|
||||
.pydevproject
|
||||
.project
|
||||
|
||||
|
|
16
inkstitch.py
16
inkstitch.py
|
@ -1,14 +1,28 @@
|
|||
import os
|
||||
import sys
|
||||
import traceback
|
||||
from argparse import ArgumentParser
|
||||
from lib.utils import save_stderr, restore_stderr
|
||||
|
||||
from lib import extensions
|
||||
from lib.utils import save_stderr, restore_stderr
|
||||
|
||||
|
||||
parser = ArgumentParser()
|
||||
parser.add_argument("--extension")
|
||||
my_args, remaining_args = parser.parse_known_args()
|
||||
|
||||
if os.path.exists(os.path.join(os.path.dirname(os.path.realpath(__file__)), "DEBUG")):
|
||||
# How to debug Ink/Stitch:
|
||||
#
|
||||
# 1. Install LiClipse (liclipse.com) -- no need to install Eclipse first
|
||||
# 2. Start debug server as described here: http://www.pydev.org/manual_adv_remote_debugger.html
|
||||
# * follow the "Note:" to enable the debug server menu item
|
||||
# 3. Create a file named "DEBUG" next to inkstitch.py in your git clone.
|
||||
# 4. Run any extension and PyDev will start debugging.
|
||||
|
||||
import pydevd
|
||||
pydevd.settrace()
|
||||
|
||||
extension_name = my_args.extension
|
||||
|
||||
# example: foo_bar_baz -> FooBarBaz
|
||||
|
|
|
@ -5,7 +5,7 @@ from ..svg import PIXELS_PER_MM
|
|||
|
||||
|
||||
def add_tie(stitches, tie_path):
|
||||
if len(tie_path) < 2 or stitches[0].no_ties:
|
||||
if len(tie_path) < 2 or tie_path[0].no_ties:
|
||||
# It's from a manual stitch block, so don't add tie stitches. The user
|
||||
# will add them if they want them.
|
||||
return
|
||||
|
|
Ładowanie…
Reference in New Issue