modules[selectedModule]["enabled"] = True
self._projectInfoStore("MODULES", modules)
depends = self._projectInfoRetrieve("MODULES")[selectedModule]["depends"]
- unsatisfied = self.selectDependencyCheck(selectedModule)
+ unsatisfied = []
+ if self.pageContent.automaticFix.isChecked():
+ unsatisfied = self.selectDependencyCheck(selectedModule)
if len(unsatisfied) > 0:
- message = self.tr("The module %1 needs the following modules:\n%2.\n\nDo you want to resolve automatically the problem?")
- message = message.arg(selectedModule).arg(", ".join(unsatisfied))
- choice = QMessageBox.warning(self, self.tr("Dependency error"), message, QMessageBox.Yes | QMessageBox.No, QMessageBox.Yes)
- if choice == QMessageBox.Yes:
- for module in unsatisfied:
- modules = self._projectInfoRetrieve("MODULES")
- modules[module]["enabled"] = True
- for index in range(self.pageContent.moduleTable.rowCount()):
- if unicode(self.pageContent.moduleTable.item(index, 1).text()) in unsatisfied:
- self._buttonGroup.button(index).setChecked(True)
+ for module in unsatisfied:
+ modules = self._projectInfoRetrieve("MODULES")
+ modules[module]["enabled"] = True
+ for index in range(self.pageContent.moduleTable.rowCount()):
+ if unicode(self.pageContent.moduleTable.item(index, 1).text()) in unsatisfied:
+ self._buttonGroup.button(index).setChecked(True)
def _moduleUnselected(self, unselectedModule):
modules = self._projectInfoRetrieve("MODULES")
modules[unselectedModule]["enabled"] = False
self._projectInfoStore("MODULES", modules)
- unsatisfied = self.unselectDependencyCheck(unselectedModule)
+ unsatisfied = []
+ if self.pageContent.automaticFix.isChecked():
+ unsatisfied = self.unselectDependencyCheck(unselectedModule)
if len(unsatisfied) > 0:
message = self.tr("The module %1 is needed by the following modules:\n%2.\n\nDo you want to resolve automatically the problem?")
message = message.arg(unselectedModule).arg(", ".join(unsatisfied))
<rect>
<x>0</x>
<y>0</y>
- <width>621</width>
- <height>428</height>
+ <width>466</width>
+ <height>366</height>
</rect>
</property>
<property name="sizePolicy" >
</property>
<layout class="QHBoxLayout" name="horizontalLayout" >
<item>
- <widget class="QTableWidget" name="moduleTable" >
- <property name="maximumSize" >
- <size>
- <width>150</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="editTriggers" >
- <set>QAbstractItemView::NoEditTriggers</set>
- </property>
- <property name="selectionMode" >
- <enum>QAbstractItemView::SingleSelection</enum>
- </property>
- <property name="selectionBehavior" >
- <enum>QAbstractItemView::SelectRows</enum>
- </property>
- <property name="showGrid" >
- <bool>false</bool>
- </property>
- </widget>
+ <layout class="QVBoxLayout" name="verticalLayout_3" >
+ <item>
+ <widget class="QCheckBox" name="automaticFix" >
+ <property name="minimumSize" >
+ <size>
+ <width>150</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize" >
+ <size>
+ <width>150</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text" >
+ <string>Correct conflicts
+automatically</string>
+ </property>
+ <property name="checked" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QTableWidget" name="moduleTable" >
+ <property name="minimumSize" >
+ <size>
+ <width>150</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize" >
+ <size>
+ <width>150</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="editTriggers" >
+ <set>QAbstractItemView::NoEditTriggers</set>
+ </property>
+ <property name="selectionMode" >
+ <enum>QAbstractItemView::SingleSelection</enum>
+ </property>
+ <property name="selectionBehavior" >
+ <enum>QAbstractItemView::SelectRows</enum>
+ </property>
+ <property name="showGrid" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout" >