Skip to content

Commit

Permalink
Ensure model is correctly created to create widget
Browse files Browse the repository at this point in the history
  • Loading branch information
gesnerpassos committed Apr 18, 2013
1 parent df1bc89 commit dd10a2c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Code/Mantid/MantidQt/API/src/ScriptRepositoryView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ Mantid::Kernel::Logger & ScriptRepositoryView::g_log = Mantid::Kernel::Logger::g
g_log.information() << "Failed to update: " << ex.what() << std::endl; //
}
}

// create the model
model = new RepoModel(this);

}catch( EXC_OPTIONS ex){
if (ex == NODIRECTORY)
// probably the user change mind. He does not want to install any more.
Expand Down Expand Up @@ -131,8 +135,7 @@ Mantid::Kernel::Logger & ScriptRepositoryView::g_log = Mantid::Kernel::Logger::g
ui->setupUi(this);
connect(ui->reloadPushButton, SIGNAL(clicked()),this,SLOT(updateModel()));

// setup the model and delegates
model = new RepoModel(this);
// setup the model and delegates
ui->repo_treeView->setModel(model);
ui->repo_treeView->setItemDelegateForColumn(1, new RepoDelegate(this));
ui->repo_treeView->setItemDelegateForColumn(2, new CheckBoxDelegate(this));
Expand Down

0 comments on commit dd10a2c

Please sign in to comment.