278 if not startdir: |
278 if not startdir: |
279 startdir = self.ppath |
279 startdir = self.ppath |
280 if not startdir: |
280 if not startdir: |
281 startdir = Preferences.getMultiProject("Workspace") |
281 startdir = Preferences.getMultiProject("Workspace") |
282 dlg = AddProjectDialog( |
282 dlg = AddProjectDialog( |
283 self.ui, startdir=startdir, categories=self.categories, category=category |
283 parent=self.ui, |
|
284 startdir=startdir, |
|
285 categories=self.categories, |
|
286 category=category, |
284 ) |
287 ) |
285 if dlg.exec() == QDialog.DialogCode.Accepted: |
288 if dlg.exec() == QDialog.DialogCode.Accepted: |
286 newProject = dlg.getProjectMetadata() |
289 newProject = dlg.getProjectMetadata() |
287 |
290 |
288 # step 1: check, if project was already added |
291 # step 1: check, if project was already added |
451 from .PropertiesDialog import PropertiesDialog |
454 from .PropertiesDialog import PropertiesDialog |
452 |
455 |
453 if not self.checkDirty(): |
456 if not self.checkDirty(): |
454 return |
457 return |
455 |
458 |
456 dlg = PropertiesDialog(self, True) |
459 dlg = PropertiesDialog(self, True, parent=self.ui) |
457 if dlg.exec() == QDialog.DialogCode.Accepted: |
460 if dlg.exec() == QDialog.DialogCode.Accepted: |
458 self.closeMultiProject() |
461 self.closeMultiProject() |
459 dlg.storeData() |
462 dlg.storeData() |
460 self.opened = True |
463 self.opened = True |
461 self.setDirty(True) |
464 self.setDirty(True) |
469 """ |
472 """ |
470 Private slot to display the properties dialog. |
473 Private slot to display the properties dialog. |
471 """ |
474 """ |
472 from .PropertiesDialog import PropertiesDialog |
475 from .PropertiesDialog import PropertiesDialog |
473 |
476 |
474 dlg = PropertiesDialog(self, False) |
477 dlg = PropertiesDialog(self, False, parent=self.ui) |
475 if dlg.exec() == QDialog.DialogCode.Accepted: |
478 if dlg.exec() == QDialog.DialogCode.Accepted: |
476 dlg.storeData() |
479 dlg.storeData() |
477 self.setDirty(True) |
480 self.setDirty(True) |
478 self.multiProjectPropertiesChanged.emit() |
481 self.multiProjectPropertiesChanged.emit() |
479 |
482 |