// creating block library
library = new BlockLibraryWidget(dispatcher,params);
- isCurrentProject = false;
+ params->isCurrentProject = false;
QLabel* labDefault = new QLabel("BLAST: BLock ASsembler Tool");
stackedWidget = new QStackedWidget;
GroupWidget* topGroup = dispatcher->loadProject(absoluteFilename);
if (topGroup != NULL) {
addTopGroup(topGroup);
+ library->updateComboScene();
}
else {
QMessageBox msgBox;
enableProjectActions(true, PROJECT_CLOSE | PROJECT_SAVE | PROJECT_SAVEAS | PROJECT_LIB, OP_RAZ);
GroupWidget* topGroup = dispatcher->createTopScene();
addTopGroup(topGroup);
-
+ library->updateComboScene();
+ params->isCurrentProject = true;
}
void MainWindow::slotCloseProject(){
dispatcher->closeCurrentProject();
- isCurrentProject = false;
+ params->isCurrentProject = false;
params->unsaveModif = false;
absoluteFilename = QString();
}
void MainWindow::slotSaveAsProject(){
- if(isCurrentProject){
+ if(params->isCurrentProject){
QFileDialog dial(0, "Select a file", "save/");
dial.setDefaultSuffix(".xml");
dial.setAcceptMode(QFileDialog::AcceptSave);
}
void MainWindow::closeEvent(QCloseEvent *event){
- if(isCurrentProject){
+ if(params->isCurrentProject){
QMessageBox msgBox;
msgBox.setText("The project has been modified.");
msgBox.setInformativeText("Do you want to save your changes?");