개정판 3d649d6b
issue #1263: unit 변경 시 계산 수행 후 도면을 저장한다
Change-Id: I7ab109391968243fc52e3a3527750ffae2f21e24
HYTOS/HYTOS/ConfigurationDialog.py | ||
---|---|---|
50 | 50 |
|
51 | 51 |
self.initialize() |
52 | 52 |
|
53 |
self.need_to_convert = None |
|
54 |
self.decimal_point = None |
|
55 |
|
|
53 | 56 |
def show_lummus_chart(self): |
54 | 57 |
from LummusChart import QLummusChart |
55 | 58 |
|
... | ... | |
92 | 95 |
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint) |
93 | 96 |
|
94 | 97 |
self.load_data() |
95 |
self.exec_() |
|
96 |
|
|
97 |
return self.isAccepted, self.ui.checkBox_Data_Convert.isChecked(), self.ui.comboBox_Decimal.currentData() |
|
98 |
return self.exec_() |
|
98 | 99 |
|
99 | 100 |
def onDecimalChanged(self, index): |
100 | 101 |
decimal = self.ui.comboBox_Decimal.itemData(index) |
... | ... | |
471 | 472 |
app_doc_data.saveConfigs(configs) |
472 | 473 |
|
473 | 474 |
self.isAccepted = True |
475 |
self.need_to_convert = self.ui.checkBox_Data_Convert.isChecked() |
|
476 |
self.decimal_point = self.ui.comboBox_Decimal.currentData() |
|
474 | 477 |
|
475 | 478 |
QDialog.accept(self) |
476 | 479 |
|
HYTOS/HYTOS/MainWindow.py | ||
---|---|---|
2022 | 2022 |
f"{sys.exc_info()[-1].tb_lineno}" |
2023 | 2023 |
self.addMessage.emit(MessageType.Error, message) |
2024 | 2024 |
|
2025 |
''' |
|
2026 |
@brief configuration |
|
2027 |
''' |
|
2028 |
|
|
2029 | 2025 |
def configuration(self): |
2026 |
"""configuration""" |
|
2030 | 2027 |
from ConfigurationDialog import QConfigurationDialog |
2031 | 2028 |
from Calculation import Conversion |
2032 | 2029 |
|
... | ... | |
2037 | 2034 |
return |
2038 | 2035 |
|
2039 | 2036 |
dlg = QConfigurationDialog(self) |
2040 |
(isAccepted, isDataConversion, decimal) = dlg.show_dialog()
|
|
2041 |
if isAccepted == True:
|
|
2042 |
if isDataConversion == True:
|
|
2043 |
Conversion(decimal)
|
|
2037 |
if QDialog.Accepted == dlg.show_dialog():
|
|
2038 |
if dlg.need_to_convert:
|
|
2039 |
Conversion(dlg.decimal_point)
|
|
2040 |
self.actionSaveCliked(show_message=False)
|
|
2044 | 2041 |
self.load_HMB() |
2045 | 2042 |
|
2046 | 2043 |
self.reload_units() |
HYTOS/HYTOS/Shapes/EngineeringConnectorItem.py | ||
---|---|---|
388 | 388 |
def mouseReleaseEvent(self, event): |
389 | 389 |
import shapely |
390 | 390 |
from SymbolSvgItem import SymbolSvgItem |
391 |
from EngineeringArrowItem import QEngineeringArrowItem
|
|
391 |
from EngineeringTextItem import QEngineeringTextItem
|
|
392 | 392 |
|
393 | 393 |
try: |
394 | 394 |
if self.parentItem() is not None and self._savedPos is not None: |
395 | 395 |
items = [item for item in self.scene().items(event.scenePos()) if |
396 |
item is not self and item is not self.parentItem() and \
|
|
397 |
(issubclass(type(item), SymbolSvgItem) or issubclass(type(item), QEngineeringTextItem) or type(
|
|
398 |
item) is QEngineeringConnectorItem)]
|
|
396 |
item is not self and item is not self.parentItem() and |
|
397 |
(issubclass(type(item), SymbolSvgItem) or issubclass(type(item), QEngineeringTextItem) or |
|
398 |
type(item) is QEngineeringConnectorItem)]
|
|
399 | 399 |
|
400 | 400 |
if items and type(items[0]) is QEngineeringConnectorItem: |
401 | 401 |
self.setPos(items[0].center()) |
내보내기 Unified diff