Fixed prioritize dialog which was broken.

This commit is contained in:
Virgil Dupras 2012-03-19 16:52:08 -04:00
parent 1f312d8532
commit c63df97dd6
3 changed files with 3 additions and 2 deletions

View File

@ -15,10 +15,10 @@ http://www.hardcoded.net/licenses/bsd_license
self = [super initWithWindowNibName:@"PrioritizeDialog"];
[self window];
model = [[PyPrioritizeDialog alloc] initWithApp:[aApp pyRef]];
[model bindCallback:createCallback(@"PrioritizeDialogView", self)];
categoryPopUp = [[HSPopUpList alloc] initWithPyRef:[[self model] categoryList] popupView:categoryPopUpView];
criteriaList = [[HSSelectableList alloc] initWithPyRef:[[self model] criteriaList] tableView:criteriaTableView];
prioritizationList = [[PrioritizeList alloc] initWithPyRef:[[self model] prioritizationList] tableView:prioritizationTableView];
[model bindCallback:createCallback(@"PrioritizeDialogView", self)];
return self;
}

View File

@ -16,6 +16,7 @@ class CriterionCategoryList(GUISelectableList):
def _update_selection(self):
self.dialog.select_category(self.dialog.categories[self.selected_index])
GUISelectableList._update_selection(self)
class PrioritizationList(GUISelectableList):
def __init__(self, dialog):

View File

@ -57,10 +57,10 @@ class PrioritizeDialog(QDialog):
QDialog.__init__(self, parent, flags)
self._setupUi()
self.model = PrioritizeDialogModel(app=app.model)
self.model.view = self
self.categoryList = ComboboxModel(model=self.model.category_list, view=self.categoryCombobox)
self.criteriaList = ListviewModel(model=self.model.criteria_list, view=self.criteriaListView)
self.prioritizationList = PrioritizationList(model=self.model.prioritization_list, view=self.prioritizationListView)
self.model.view = self
self.addCriteriaButton.clicked.connect(self.model.add_selected)
self.removeCriteriaButton.clicked.connect(self.model.remove_selected)