Revision 4:a88c2a0279ba
| main/MainWindow.cpp | ||
|---|---|---|
| 1248 | 1248 |
|
| 1249 | 1249 |
if (newLayer) {
|
| 1250 | 1250 |
|
| 1251 |
AddPaneCommand *command = new AddPaneCommand(this); |
|
| 1252 |
CommandHistory::getInstance()->addCommand(command); |
|
| 1253 |
|
|
| 1254 |
Pane *pane = command->getPane(); |
|
| 1255 |
if (!pane) return; |
|
| 1256 |
|
|
| 1257 | 1251 |
// Set the source model to NULL to avoid us treating it as a |
| 1258 | 1252 |
// different visualisation for the main model and replacing it |
| 1259 | 1253 |
// when one of the visualisation mode toggles is activated |
| 1260 | 1254 |
newLayer->getModel()->setSourceModel(0); |
| 1255 |
m_document->setChannel(newLayer, input.getChannel()); |
|
| 1261 | 1256 |
|
| 1257 |
Pane *pane = m_paneStack->insertPane(0); |
|
| 1262 | 1258 |
m_document->addLayerToView(pane, newLayer); |
| 1263 |
m_document->setChannel(newLayer, input.getChannel()); |
|
| 1264 |
// m_paneStack->setCurrentLayer(pane, newLayer); |
|
| 1259 |
|
|
| 1260 |
pane = m_paneStack->insertPane(m_paneStack->getPaneCount()); |
|
| 1261 |
m_document->addLayerToView(pane, newLayer); |
|
| 1265 | 1262 |
} |
| 1266 | 1263 |
|
| 1267 | 1264 |
updateMenuStates(); |
Also available in: Unified diff