Commit 3c68fbb4 authored by Sylvain Thery's avatar Sylvain Thery

bug cleanAll, vizu view name

parent ec5fcdbb
......@@ -1282,17 +1282,24 @@ void SCHNApps::cleanAll()
//remove views
foreach(View* v, m_views)
{
if (v->getName() != QString("view_0"))
removeView(v->getName());
else
v->setCurrentCamera(QString("camera_0"));
removeView(v->getName());
}
// set the camera to camera_0
m_firstView->setCurrentCamera(QString("camera_0"));
// change name of first view to view 0 if needed
if (m_firstView->m_name != QString("view_0"))
{
m_views.remove(m_firstView->m_name);
m_firstView->m_name = QString("view_0");
m_views.insert(m_firstView->m_name, m_firstView);
}
//remove cameras
foreach(Camera* cam, m_cameras)
{
if (cam->getName() != QString("camera_0"))
removeCamera(cam->getName());
removeCamera(cam->getName());
}
//remove maps
......@@ -1306,6 +1313,9 @@ void SCHNApps::cleanAll()
{
disablePlugin(p->getName());
}
Camera::cameraCount = 1;
View::viewCount = 1;
}
......
......@@ -643,7 +643,12 @@ void View::keyReleaseEvent(QKeyEvent *event)
void View::mousePressEvent(QMouseEvent* event)
{
if (!isSelectedView())
{
m_schnapps->setSelectedView(this);
m_schnapps->statusBarMessage(QString("Selecting ") + this->getName(), 2000);
}
else if (event->y() < 20)
m_schnapps->statusBarMessage(this->getName(), 2000);
if (m_buttonAreaLeft->isClicked(event->x(), event->y()))
m_buttonAreaLeft->clickButton(event->x(), event->y(), event->globalX(), event->globalY());
......
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