Commit 014790e9 authored by Pierre Kraemer's avatar Pierre Kraemer

update camera BB when associated to a new view + properly activate or not a...

update camera BB when associated to a new view + properly activate or not a plugin dock tab on plugin activation
parent 6a1baf21
......@@ -83,7 +83,7 @@ private:
glm::mat4 getCurrentProjectionMatrix() const;
glm::mat4 getCurrentModelViewProjectionMatrix() const;
void updateViewBB();
void updateCurrentCameraBB();
private slots:
void ui_verticalSplitView(int x, int y, int globalX, int globalY);
......
......@@ -413,7 +413,15 @@ void SCHNApps::addPluginDockTab(Plugin* plugin, QWidget* tabWidget, const QStrin
int idx = m_pluginDockTabWidget->addTab(tabWidget, tabText);
m_pluginDock->setVisible(true);
m_pluginDockTabWidget->setTabEnabled(idx, true);
PluginInteraction* pi = dynamic_cast<PluginInteraction*>(plugin);
if(pi)
{
if(pi->isLinkedToView(m_selectedView))
m_pluginDockTabWidget->setTabEnabled(idx, true);
else
m_pluginDockTabWidget->setTabEnabled(idx, false);
}
if(currentTab != -1)
m_pluginDockTabWidget->setCurrentIndex(currentTab);
......
......@@ -67,6 +67,7 @@ void View::setCurrentCamera(Camera* c)
emit(currentCameraChanged(prev, c));
updateCurrentCameraBB();
updateGL();
}
}
......@@ -131,7 +132,7 @@ void View::linkMap(MapHandlerGen* map)
l_maps.push_back(map);
map->linkView(this);
emit(mapLinked(map));
updateViewBB();
updateCurrentCameraBB();
updateGL();
}
}
......@@ -149,7 +150,7 @@ void View::unlinkMap(MapHandlerGen* map)
{
map->unlinkView(this);
emit(mapUnlinked(map));
updateViewBB();
updateCurrentCameraBB();
updateGL();
}
}
......@@ -397,7 +398,7 @@ glm::mat4 View::getCurrentModelViewProjectionMatrix() const
return mvpm;
}
void View::updateViewBB()
void View::updateCurrentCameraBB()
{
qglviewer::Vec bbMin(0,0,0);
qglviewer::Vec bbMax(1,1,1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment