개정판 58bf9dec
issue #000: fix symbol rotate
Change-Id: Id84dfeb32a2d857b928cad0e256e439c6a25257f
DTI_PID/DTI_PID/LineNoTracer.py | ||
---|---|---|
649 | 649 |
for connector in spec[0].connectors: |
650 | 650 |
if connector.connectedItem is spec[1]: |
651 | 651 |
spec_break = SymbolSvgItem.createItem(symbol.getType(), svgFilePath) |
652 |
pt = [20 + connector.center()[0] - float(symbol.getOriginalPoint().split(',')[0]), 20 + connector.center()[1] - float(symbol.getOriginalPoint().split(',')[1])]
|
|
652 |
pt = [60 + connector.center()[0] - float(symbol.getOriginalPoint().split(',')[0]), 30 + connector.center()[1] - float(symbol.getOriginalPoint().split(',')[1])]
|
|
653 | 653 |
origin = [0, 0] |
654 | 654 |
if 2 == len(symbol.getOriginalPoint().split(',')): |
655 | 655 |
tokens = symbol.getOriginalPoint().split(',') |
DTI_PID/DTI_PID/MainWindow.py | ||
---|---|---|
1177 | 1177 |
self.progress.resize(600,100) |
1178 | 1178 |
self.progress.setWindowTitle(self.tr("Reading file...")) |
1179 | 1179 |
self.progress.show() |
1180 |
## Load data on xml
|
|
1180 |
## Load data |
|
1181 | 1181 |
path = os.path.join(appDocData.getCurrentProject().getTempPath(), appDocData.imgName + '.xml') |
1182 | 1182 |
configs = appDocData.getConfigs('Data Load', 'Xml First') |
1183 | 1183 |
if configs and int(configs[0].value) is 1 and os.path.isfile(path): |
DTI_PID/DTI_PID/Shapes/SymbolSvgItem.py | ||
---|---|---|
875 | 875 |
''' |
876 | 876 |
|
877 | 877 |
def mouseReleaseEvent(self, event): |
878 |
if hasattr(self, '_rotating') and event.button() == Qt.RightButton: |
|
878 |
if hasattr(self, '_rotating') and event.button() == Qt.RightButton and hasattr(self, '__angle'):
|
|
879 | 879 |
self.angle = -self.__angle if self.__angle > -math.pi and self.__angle < 0 else 2 * math.pi - self.__angle |
880 | 880 |
self.ungrabMouse() |
881 | 881 |
del self._rotating |
내보내기 Unified diff