comparison main/MainWindow.cpp @ 195:61bf55e80080

...
author Chris Cannam
date Thu, 18 Oct 2007 09:36:05 +0000
parents c851c49c79fe
children c08c312b2399
comparison
equal deleted inserted replaced
194:c851c49c79fe 195:61bf55e80080
3075 } 3075 }
3076 } 3076 }
3077 3077
3078 if (mode == ReplaceCurrentPane) { 3078 if (mode == ReplaceCurrentPane) {
3079 3079
3080 std::cerr << "replace current pane" << std::endl; 3080 // std::cerr << "replace current pane" << std::endl;
3081 3081
3082 Pane *pane = m_paneStack->getCurrentPane(); 3082 Pane *pane = m_paneStack->getCurrentPane();
3083 if (pane) { 3083 if (pane) {
3084 std::cerr << "have pane" << std::endl; 3084 // std::cerr << "have pane" << std::endl;
3085 3085
3086 if (getMainModel()) { 3086 if (getMainModel()) {
3087 std::cerr << "have main model" << std::endl; 3087 // std::cerr << "have main model" << std::endl;
3088 3088
3089 View::ModelSet models(pane->getModels()); 3089 View::ModelSet models(pane->getModels());
3090 if (models.find(getMainModel()) != models.end()) { 3090 if (models.find(getMainModel()) != models.end()) {
3091 std::cerr << "main model is in pane, setting to ReplaceMainModel" << std::endl; 3091 // std::cerr << "main model is in pane, setting to ReplaceMainModel" << std::endl;
3092 mode = ReplaceMainModel; 3092 mode = ReplaceMainModel;
3093 } 3093 }
3094 } else { 3094 } else {
3095 std::cerr << "no main model, setting to ReplaceMainModel" << std::endl; 3095 // std::cerr << "no main model, setting to ReplaceMainModel" << std::endl;
3096 mode = ReplaceMainModel; 3096 mode = ReplaceMainModel;
3097 } 3097 }
3098 } else { 3098 } else {
3099 std::cerr << "no pane, setting to CreateAdditionalModel" << std::endl; 3099 // std::cerr << "no pane, setting to CreateAdditionalModel" << std::endl;
3100 mode = CreateAdditionalModel; 3100 mode = CreateAdditionalModel;
3101 } 3101 }
3102 } 3102 }
3103 3103
3104 if (mode == CreateAdditionalModel && !getMainModel()) { 3104 if (mode == CreateAdditionalModel && !getMainModel()) {
3105 std::cerr << "mode is CreateAdditionalModel and no main model, setting to ReplaceMainModel" << std::endl; 3105 // std::cerr << "mode is CreateAdditionalModel and no main model, setting to ReplaceMainModel" << std::endl;
3106 mode = ReplaceMainModel; 3106 mode = ReplaceMainModel;
3107 } 3107 }
3108 3108
3109 std::cerr << "mode now " << mode << std::endl; 3109 // std::cerr << "mode now " << mode << std::endl;
3110 3110
3111 if (mode == ReplaceMainModel) { 3111 if (mode == ReplaceMainModel) {
3112 3112
3113 Model *prevMain = getMainModel(); 3113 Model *prevMain = getMainModel();
3114 if (prevMain) { 3114 if (prevMain) {