Commit 986a72a3 authored by Pierre Kraemer's avatar Pierre Kraemer

SCHNApps: update some signals connections

parent 42e522b2
...@@ -21,9 +21,10 @@ public: ...@@ -21,9 +21,10 @@ public:
private: private:
Window* m_window; Window* m_window;
MapHandlerGen* m_selectedMap;
public slots: public slots:
void selectedMapChanged(); void refreshUI();
void addMapToList(MapHandlerGen* m); void addMapToList(MapHandlerGen* m);
void removeMapFromList(MapHandlerGen* m); void removeMapFromList(MapHandlerGen* m);
}; };
......
...@@ -21,9 +21,10 @@ public: ...@@ -21,9 +21,10 @@ public:
private: private:
Window* m_window; Window* m_window;
MapHandlerGen* m_selectedMap;
public slots: public slots:
void selectedMapChanged(); void refreshUI();
void addMapToList(MapHandlerGen* m); void addMapToList(MapHandlerGen* m);
void removeMapFromList(MapHandlerGen* m); void removeMapFromList(MapHandlerGen* m);
}; };
......
...@@ -10,7 +10,9 @@ namespace CGoGN ...@@ -10,7 +10,9 @@ namespace CGoGN
namespace SCHNApps namespace SCHNApps
{ {
ComputeCurvatureDialog::ComputeCurvatureDialog(Window* w) : m_window(w) ComputeCurvatureDialog::ComputeCurvatureDialog(Window* w) :
m_window(w),
m_selectedMap(NULL)
{ {
setupUi(this); setupUi(this);
...@@ -23,15 +25,18 @@ ComputeCurvatureDialog::ComputeCurvatureDialog(Window* w) : m_window(w) ...@@ -23,15 +25,18 @@ ComputeCurvatureDialog::ComputeCurvatureDialog(Window* w) : m_window(w)
connect(m_window, SIGNAL(mapAdded(MapHandlerGen*)), this, SLOT(addMapToList(MapHandlerGen*))); connect(m_window, SIGNAL(mapAdded(MapHandlerGen*)), this, SLOT(addMapToList(MapHandlerGen*)));
connect(m_window, SIGNAL(mapRemoved(MapHandlerGen*)), this, SLOT(removeMapFromList(MapHandlerGen*))); connect(m_window, SIGNAL(mapRemoved(MapHandlerGen*)), this, SLOT(removeMapFromList(MapHandlerGen*)));
connect(mapList, SIGNAL(itemSelectionChanged()), this, SLOT(selectedMapChanged())); connect(mapList, SIGNAL(itemSelectionChanged()), this, SLOT(refreshUI()));
const QList<MapHandlerGen*>& maps = m_window->getMapsList(); const QList<MapHandlerGen*>& maps = m_window->getMapsList();
foreach(MapHandlerGen* map, maps) foreach(MapHandlerGen* map, maps)
mapList->addItem(map->getName()); mapList->addItem(map->getName());
} }
void ComputeCurvatureDialog::selectedMapChanged() void ComputeCurvatureDialog::refreshUI()
{ {
if(m_selectedMap)
disconnect(m_selectedMap, SIGNAL(attributeAdded()), this, SLOT(refreshUI()));
QList<QListWidgetItem*> currentItems = mapList->selectedItems(); QList<QListWidgetItem*> currentItems = mapList->selectedItems();
if(!currentItems.empty()) if(!currentItems.empty())
{ {
...@@ -94,7 +99,12 @@ void ComputeCurvatureDialog::selectedMapChanged() ...@@ -94,7 +99,12 @@ void ComputeCurvatureDialog::selectedMapChanged()
++k; ++k;
} }
} }
m_selectedMap = mh;
connect(m_selectedMap, SIGNAL(attributeAdded()), this, SLOT(refreshUI()));
} }
else
m_selectedMap = NULL;
} }
void ComputeCurvatureDialog::addMapToList(MapHandlerGen* m) void ComputeCurvatureDialog::addMapToList(MapHandlerGen* m)
...@@ -104,13 +114,14 @@ void ComputeCurvatureDialog::addMapToList(MapHandlerGen* m) ...@@ -104,13 +114,14 @@ void ComputeCurvatureDialog::addMapToList(MapHandlerGen* m)
void ComputeCurvatureDialog::removeMapFromList(MapHandlerGen* m) void ComputeCurvatureDialog::removeMapFromList(MapHandlerGen* m)
{ {
for(int i = 0; i < mapList->count(); ++i) QList<QListWidgetItem*> items = mapList->findItems(m->getName(), Qt::MatchExactly);
if(!items.empty())
delete items[0];
if(m_selectedMap == m)
{ {
if(mapList->item(i)->text() == m->getName()) disconnect(m_selectedMap, SIGNAL(attributeAdded()), this, SLOT(refreshUI()));
{ m_selectedMap = NULL;
delete mapList->item(i);
return;
}
} }
} }
......
...@@ -10,7 +10,9 @@ namespace CGoGN ...@@ -10,7 +10,9 @@ namespace CGoGN
namespace SCHNApps namespace SCHNApps
{ {
ComputeNormalDialog::ComputeNormalDialog(Window* w) : m_window(w) ComputeNormalDialog::ComputeNormalDialog(Window* w) :
m_window(w),
m_selectedMap(NULL)
{ {
setupUi(this); setupUi(this);
...@@ -19,15 +21,18 @@ ComputeNormalDialog::ComputeNormalDialog(Window* w) : m_window(w) ...@@ -19,15 +21,18 @@ ComputeNormalDialog::ComputeNormalDialog(Window* w) : m_window(w)
connect(m_window, SIGNAL(mapAdded(MapHandlerGen*)), this, SLOT(addMapToList(MapHandlerGen*))); connect(m_window, SIGNAL(mapAdded(MapHandlerGen*)), this, SLOT(addMapToList(MapHandlerGen*)));
connect(m_window, SIGNAL(mapRemoved(MapHandlerGen*)), this, SLOT(removeMapFromList(MapHandlerGen*))); connect(m_window, SIGNAL(mapRemoved(MapHandlerGen*)), this, SLOT(removeMapFromList(MapHandlerGen*)));
connect(mapList, SIGNAL(itemSelectionChanged()), this, SLOT(selectedMapChanged())); connect(mapList, SIGNAL(itemSelectionChanged()), this, SLOT(refreshUI()));
const QList<MapHandlerGen*>& maps = m_window->getMapsList(); const QList<MapHandlerGen*>& maps = m_window->getMapsList();
foreach(MapHandlerGen* map, maps) foreach(MapHandlerGen* map, maps)
mapList->addItem(map->getName()); mapList->addItem(map->getName());
} }
void ComputeNormalDialog::selectedMapChanged() void ComputeNormalDialog::refreshUI()
{ {
if(m_selectedMap)
disconnect(m_selectedMap, SIGNAL(attributeAdded()), this, SLOT(refreshUI()));
QList<QListWidgetItem*> currentItems = mapList->selectedItems(); QList<QListWidgetItem*> currentItems = mapList->selectedItems();
if(!currentItems.empty()) if(!currentItems.empty())
{ {
...@@ -59,7 +64,12 @@ void ComputeNormalDialog::selectedMapChanged() ...@@ -59,7 +64,12 @@ void ComputeNormalDialog::selectedMapChanged()
++j; ++j;
} }
} }
m_selectedMap = mh;
connect(m_selectedMap, SIGNAL(attributeAdded()), this, SLOT(refreshUI()));
} }
else
m_selectedMap = NULL;
} }
void ComputeNormalDialog::addMapToList(MapHandlerGen* m) void ComputeNormalDialog::addMapToList(MapHandlerGen* m)
...@@ -69,13 +79,14 @@ void ComputeNormalDialog::addMapToList(MapHandlerGen* m) ...@@ -69,13 +79,14 @@ void ComputeNormalDialog::addMapToList(MapHandlerGen* m)
void ComputeNormalDialog::removeMapFromList(MapHandlerGen* m) void ComputeNormalDialog::removeMapFromList(MapHandlerGen* m)
{ {
for(int i = 0; i < mapList->count(); ++i) QList<QListWidgetItem*> items = mapList->findItems(m->getName(), Qt::MatchExactly);
if(!items.empty())
delete items[0];
if(m_selectedMap == m)
{ {
if(mapList->item(i)->text() == m->getName()) disconnect(m_selectedMap, SIGNAL(attributeAdded()), this, SLOT(refreshUI()));
{ m_selectedMap = NULL;
delete mapList->item(i);
return;
}
} }
} }
......
...@@ -45,20 +45,20 @@ void DifferentialPropertiesPlugin::computeNormal() ...@@ -45,20 +45,20 @@ void DifferentialPropertiesPlugin::computeNormal()
{ {
const QString& mapname = currentItems[0]->text(); const QString& mapname = currentItems[0]->text();
MapHandler<PFP2>* mh = static_cast<MapHandler<PFP2>*>(m_window->getMap(mapname)); MapHandler<PFP2>* mh = static_cast<MapHandler<PFP2>*>(m_window->getMap(mapname));
PFP2::MAP* map = mh->getMap();
std::string positionName = m_computeNormalDialog->combo_positionAttribute->currentText().toUtf8().constData(); QString positionName = m_computeNormalDialog->combo_positionAttribute->currentText();
std::string normalName; QString normalName;
if(m_computeNormalDialog->normalAttributeName->text().isEmpty()) if(m_computeNormalDialog->normalAttributeName->text().isEmpty())
normalName = m_computeNormalDialog->combo_normalAttribute->currentText().toUtf8().constData(); normalName = m_computeNormalDialog->combo_normalAttribute->currentText();
else else
normalName = m_computeNormalDialog->normalAttributeName->text().toUtf8().constData(); normalName = m_computeNormalDialog->normalAttributeName->text();
VertexAttribute<PFP2::VEC3> position = map->getAttribute<PFP2::VEC3, VERTEX>(positionName); VertexAttribute<PFP2::VEC3> position = mh->getAttribute<PFP2::VEC3, VERTEX>(positionName);
VertexAttribute<PFP2::VEC3> normal = map->getAttribute<PFP2::VEC3, VERTEX>(normalName); VertexAttribute<PFP2::VEC3> normal = mh->getAttribute<PFP2::VEC3, VERTEX>(normalName);
if(!normal.isValid()) if(!normal.isValid())
normal = map->addAttribute<PFP2::VEC3, VERTEX>(normalName); normal = mh->addAttribute<PFP2::VEC3, VERTEX>(normalName);
PFP2::MAP* map = mh->getMap();
Algo::Surface::Geometry::computeNormalVertices<PFP2>(*map, position, normal); Algo::Surface::Geometry::computeNormalVertices<PFP2>(*map, position, normal);
if(m_computeNormalDialog->check_createVBO->checkState() == Qt::Checked) if(m_computeNormalDialog->check_createVBO->checkState() == Qt::Checked)
...@@ -77,64 +77,64 @@ void DifferentialPropertiesPlugin::computeCurvature() ...@@ -77,64 +77,64 @@ void DifferentialPropertiesPlugin::computeCurvature()
{ {
const QString& mapname = currentItems[0]->text(); const QString& mapname = currentItems[0]->text();
MapHandler<PFP2>* mh = static_cast<MapHandler<PFP2>*>(m_window->getMap(mapname)); MapHandler<PFP2>* mh = static_cast<MapHandler<PFP2>*>(m_window->getMap(mapname));
PFP2::MAP* map = mh->getMap();
std::string positionName = m_computeCurvatureDialog->combo_positionAttribute->currentText().toUtf8().constData(); QString positionName = m_computeCurvatureDialog->combo_positionAttribute->currentText();
std::string normalName = m_computeCurvatureDialog->combo_normalAttribute->currentText().toUtf8().constData(); QString normalName = m_computeCurvatureDialog->combo_normalAttribute->currentText();
VertexAttribute<PFP2::VEC3> position = map->getAttribute<PFP2::VEC3, VERTEX>(positionName); VertexAttribute<PFP2::VEC3> position = mh->getAttribute<PFP2::VEC3, VERTEX>(positionName);
VertexAttribute<PFP2::VEC3> normal = map->getAttribute<PFP2::VEC3, VERTEX>(normalName); VertexAttribute<PFP2::VEC3> normal = mh->getAttribute<PFP2::VEC3, VERTEX>(normalName);
std::string KmaxName; QString KmaxName;
if(m_computeCurvatureDialog->KmaxAttributeName->text().isEmpty()) if(m_computeCurvatureDialog->KmaxAttributeName->text().isEmpty())
KmaxName = m_computeCurvatureDialog->combo_KmaxAttribute->currentText().toUtf8().constData(); KmaxName = m_computeCurvatureDialog->combo_KmaxAttribute->currentText();
else else
KmaxName = m_computeCurvatureDialog->KmaxAttributeName->text().toUtf8().constData(); KmaxName = m_computeCurvatureDialog->KmaxAttributeName->text();
VertexAttribute<PFP2::VEC3> Kmax = map->getAttribute<PFP2::VEC3, VERTEX>(KmaxName); VertexAttribute<PFP2::VEC3> Kmax = mh->getAttribute<PFP2::VEC3, VERTEX>(KmaxName);
if(!Kmax.isValid()) if(!Kmax.isValid())
Kmax = map->addAttribute<PFP2::VEC3, VERTEX>(KmaxName); Kmax = mh->addAttribute<PFP2::VEC3, VERTEX>(KmaxName);
std::string kmaxName; QString kmaxName;
if(m_computeCurvatureDialog->kmaxAttributeName->text().isEmpty()) if(m_computeCurvatureDialog->kmaxAttributeName->text().isEmpty())
kmaxName = m_computeCurvatureDialog->combo_kmaxAttribute->currentText().toUtf8().constData(); kmaxName = m_computeCurvatureDialog->combo_kmaxAttribute->currentText();
else else
kmaxName = m_computeCurvatureDialog->kmaxAttributeName->text().toUtf8().constData(); kmaxName = m_computeCurvatureDialog->kmaxAttributeName->text();
VertexAttribute<PFP2::REAL> kmax = map->getAttribute<PFP2::REAL, VERTEX>(kmaxName); VertexAttribute<PFP2::REAL> kmax = mh->getAttribute<PFP2::REAL, VERTEX>(kmaxName);
if(!kmax.isValid()) if(!kmax.isValid())
kmax = map->addAttribute<PFP2::REAL, VERTEX>(kmaxName); kmax = mh->addAttribute<PFP2::REAL, VERTEX>(kmaxName);
std::string KminName; QString KminName;
if(m_computeCurvatureDialog->KminAttributeName->text().isEmpty()) if(m_computeCurvatureDialog->KminAttributeName->text().isEmpty())
KminName = m_computeCurvatureDialog->combo_KminAttribute->currentText().toUtf8().constData(); KminName = m_computeCurvatureDialog->combo_KminAttribute->currentText();
else else
KminName = m_computeCurvatureDialog->KminAttributeName->text().toUtf8().constData(); KminName = m_computeCurvatureDialog->KminAttributeName->text();
VertexAttribute<PFP2::VEC3> Kmin = map->getAttribute<PFP2::VEC3, VERTEX>(KminName); VertexAttribute<PFP2::VEC3> Kmin = mh->getAttribute<PFP2::VEC3, VERTEX>(KminName);
if(!Kmin.isValid()) if(!Kmin.isValid())
Kmin = map->addAttribute<PFP2::VEC3, VERTEX>(KminName); Kmin = mh->addAttribute<PFP2::VEC3, VERTEX>(KminName);
std::string kminName; QString kminName;
if(m_computeCurvatureDialog->kminAttributeName->text().isEmpty()) if(m_computeCurvatureDialog->kminAttributeName->text().isEmpty())
kminName = m_computeCurvatureDialog->combo_kminAttribute->currentText().toUtf8().constData(); kminName = m_computeCurvatureDialog->combo_kminAttribute->currentText();
else else
kminName = m_computeCurvatureDialog->kminAttributeName->text().toUtf8().constData(); kminName = m_computeCurvatureDialog->kminAttributeName->text();
VertexAttribute<PFP2::REAL> kmin = map->getAttribute<PFP2::REAL, VERTEX>(kminName); VertexAttribute<PFP2::REAL> kmin = mh->getAttribute<PFP2::REAL, VERTEX>(kminName);
if(!kmin.isValid()) if(!kmin.isValid())
kmin = map->addAttribute<PFP2::REAL, VERTEX>(kminName); kmin = mh->addAttribute<PFP2::REAL, VERTEX>(kminName);
std::string KnormalName; QString KnormalName;
if(m_computeCurvatureDialog->KnormalAttributeName->text().isEmpty()) if(m_computeCurvatureDialog->KnormalAttributeName->text().isEmpty())
KnormalName = m_computeCurvatureDialog->combo_KnormalAttribute->currentText().toUtf8().constData(); KnormalName = m_computeCurvatureDialog->combo_KnormalAttribute->currentText();
else else
KnormalName = m_computeCurvatureDialog->KnormalAttributeName->text().toUtf8().constData(); KnormalName = m_computeCurvatureDialog->KnormalAttributeName->text();
VertexAttribute<PFP2::VEC3> Knormal = map->getAttribute<PFP2::VEC3, VERTEX>(KnormalName); VertexAttribute<PFP2::VEC3> Knormal = mh->getAttribute<PFP2::VEC3, VERTEX>(KnormalName);
if(!Knormal.isValid()) if(!Knormal.isValid())
Knormal = map->addAttribute<PFP2::VEC3, VERTEX>(KnormalName); Knormal = mh->addAttribute<PFP2::VEC3, VERTEX>(KnormalName);
EdgeAttribute<PFP2::REAL> edgeAngle = map->getAttribute<PFP2::REAL, EDGE>("edgeAngle"); EdgeAttribute<PFP2::REAL> edgeAngle = mh->getAttribute<PFP2::REAL, EDGE>("edgeAngle");
if(!edgeAngle.isValid()) if(!edgeAngle.isValid())
edgeAngle = map->addAttribute<PFP2::REAL, EDGE>("edgeAngle"); edgeAngle = mh->addAttribute<PFP2::REAL, EDGE>("edgeAngle");
Algo::Surface::Geometry::computeAnglesBetweenNormalsOnEdges<PFP2>(*map, position, edgeAngle);
PFP2::MAP* map = mh->getMap();
Algo::Surface::Geometry::computeAnglesBetweenNormalsOnEdges<PFP2>(*map, position, edgeAngle);
Algo::Surface::Geometry::computeCurvatureVertices_NormalCycles_Projected<PFP2>(*map, 0.01f * mh->getBBdiagSize(), position, normal, edgeAngle, kmax, kmin, Kmax, Kmin, Knormal); Algo::Surface::Geometry::computeCurvatureVertices_NormalCycles_Projected<PFP2>(*map, 0.01f * mh->getBBdiagSize(), position, normal, edgeAngle, kmax, kmin, Kmax, Kmin, Knormal);
if(m_computeCurvatureDialog->check_KmaxCreateVBO->checkState() == Qt::Checked) if(m_computeCurvatureDialog->check_KmaxCreateVBO->checkState() == Qt::Checked)
......
...@@ -45,6 +45,8 @@ MapHandlerGen* ImportSurfacePlugin::importFromFile(const QString& fileName) ...@@ -45,6 +45,8 @@ MapHandlerGen* ImportSurfacePlugin::importFromFile(const QString& fileName)
} }
return mhg; return mhg;
} }
else
return NULL;
} }
void ImportSurfacePlugin::importFromFileDialog() void ImportSurfacePlugin::importFromFileDialog()
......
...@@ -45,6 +45,8 @@ MapHandlerGen* ImportVolumePlugin::importFromFile(const QString& fileName) ...@@ -45,6 +45,8 @@ MapHandlerGen* ImportVolumePlugin::importFromFile(const QString& fileName)
} }
return mhg; return mhg;
} }
else
return NULL;
} }
void ImportVolumePlugin::importFromFileDialog() void ImportVolumePlugin::importFromFileDialog()
......
...@@ -21,9 +21,10 @@ public: ...@@ -21,9 +21,10 @@ public:
private: private:
Window* m_window; Window* m_window;
MapHandlerGen* m_selectedMap;
public slots: public slots:
void selectedMapChanged(); void refreshUI();
void addMapToList(MapHandlerGen* m); void addMapToList(MapHandlerGen* m);
void removeMapFromList(MapHandlerGen* m); void removeMapFromList(MapHandlerGen* m);
}; };
......
...@@ -10,7 +10,9 @@ namespace CGoGN ...@@ -10,7 +10,9 @@ namespace CGoGN
namespace SCHNApps namespace SCHNApps
{ {
SubdivideSurfaceDialog::SubdivideSurfaceDialog(Window* w) : m_window(w) SubdivideSurfaceDialog::SubdivideSurfaceDialog(Window* w) :
m_window(w),
m_selectedMap(NULL)
{ {
setupUi(this); setupUi(this);
...@@ -24,8 +26,11 @@ SubdivideSurfaceDialog::SubdivideSurfaceDialog(Window* w) : m_window(w) ...@@ -24,8 +26,11 @@ SubdivideSurfaceDialog::SubdivideSurfaceDialog(Window* w) : m_window(w)
mapList->addItem(map->getName()); mapList->addItem(map->getName());
} }
void SubdivideSurfaceDialog::selectedMapChanged() void SubdivideSurfaceDialog::refreshUI()
{ {
if(m_selectedMap)
disconnect(m_selectedMap, SIGNAL(attributeAdded()), this, SLOT(refreshUI()));
QList<QListWidgetItem*> currentItems = mapList->selectedItems(); QList<QListWidgetItem*> currentItems = mapList->selectedItems();
if(!currentItems.empty()) if(!currentItems.empty())
{ {
...@@ -52,7 +57,12 @@ void SubdivideSurfaceDialog::selectedMapChanged() ...@@ -52,7 +57,12 @@ void SubdivideSurfaceDialog::selectedMapChanged()
++j; ++j;
} }
} }
m_selectedMap = mh;
connect(m_selectedMap, SIGNAL(attributeAdded()), this, SLOT(refreshUI()));
} }
else
m_selectedMap = NULL;
} }
void SubdivideSurfaceDialog::addMapToList(MapHandlerGen* m) void SubdivideSurfaceDialog::addMapToList(MapHandlerGen* m)
...@@ -62,13 +72,14 @@ void SubdivideSurfaceDialog::addMapToList(MapHandlerGen* m) ...@@ -62,13 +72,14 @@ void SubdivideSurfaceDialog::addMapToList(MapHandlerGen* m)
void SubdivideSurfaceDialog::removeMapFromList(MapHandlerGen* m) void SubdivideSurfaceDialog::removeMapFromList(MapHandlerGen* m)
{ {
for(int i = 0; i < mapList->count(); ++i) QList<QListWidgetItem*> items = mapList->findItems(m->getName(), Qt::MatchExactly);
if(!items.empty())
delete items[0];
if(m_selectedMap == m)
{ {
if(mapList->item(i)->text() == m->getName()) disconnect(m_selectedMap, SIGNAL(attributeAdded()), this, SLOT(refreshUI()));
{ m_selectedMap = NULL;
delete mapList->item(i);
return;
}
} }
} }
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include "plugin.h" #include "plugin.h"
#include "Topology/generic/genericmap.h" #include "Topology/generic/genericmap.h"
#include "Topology/generic/attribmap.h"
#include "Topology/generic/functor.h" #include "Topology/generic/functor.h"
#include "Topology/generic/attributeHandler.h" #include "Topology/generic/attributeHandler.h"
#include "Utils/vbo.h" #include "Utils/vbo.h"
...@@ -48,6 +49,25 @@ public slots: ...@@ -48,6 +49,25 @@ public slots:
public: public:
void draw(Utils::GLSLShader* shader, int primitive) { m_render->draw(shader, primitive); } void draw(Utils::GLSLShader* shader, int primitive) { m_render->draw(shader, primitive); }
/*********************************************************
* MANAGE ATTRIBUTES
*********************************************************/
template <typename T, unsigned int ORBIT>
AttributeHandler<T, ORBIT> getAttribute(const QString& nameAttr)
{
AttributeHandler<T,ORBIT> ah = static_cast<AttribMap*>(m_map)->getAttribute<T,ORBIT>(nameAttr.toUtf8().constData());
return ah;
}
template <typename T, unsigned int ORBIT>
AttributeHandler<T, ORBIT> addAttribute(const QString& nameAttr)
{
AttributeHandler<T,ORBIT> ah = static_cast<AttribMap*>(m_map)->addAttribute<T,ORBIT>(nameAttr.toUtf8().constData());
emit(attributeAdded());
return ah;
}
/********************************************************* /*********************************************************
* MANAGE VBOs * MANAGE VBOs
*********************************************************/ *********************************************************/
...@@ -105,6 +125,7 @@ protected: ...@@ -105,6 +125,7 @@ protected:
VBOHash h_vbo; VBOHash h_vbo;
signals: signals:
void attributeAdded();
void vboAdded(Utils::VBO* vbo); void vboAdded(Utils::VBO* vbo);
void vboRemoved(Utils::VBO* vbo); void vboRemoved(Utils::VBO* vbo);
}; };
......
...@@ -54,7 +54,7 @@ void CameraViewDialog::selectCurrentCamera() ...@@ -54,7 +54,7 @@ void CameraViewDialog::selectCurrentCamera()
void CameraViewDialog::selectedCameraChanged() void CameraViewDialog::selectedCameraChanged()
{ {
if(b_refreshingUI) if(!b_refreshingUI)
{ {
QList<QListWidgetItem*> currentItems = cameraList->selectedItems(); QList<QListWidgetItem*> currentItems = cameraList->selectedItems();
if(currentItems.empty()) if(currentItems.empty())
...@@ -77,7 +77,6 @@ void CameraViewDialog::selectCamera(View* view, Camera* camera) ...@@ -77,7 +77,6 @@ void CameraViewDialog::selectCamera(View* view, Camera* camera)
{ {
b_refreshingUI = true; b_refreshingUI = true;
items[0]->setSelected(true); items[0]->setSelected(true);
m_view->updateGL();
b_refreshingUI = false; b_refreshingUI = false;
} }
} }
...@@ -92,7 +91,6 @@ void CameraViewDialog::deselectCamera(View* view, Camera* camera) ...@@ -92,7 +91,6 @@ void CameraViewDialog::deselectCamera(View* view, Camera* camera)
{ {
b_refreshingUI = true; b_refreshingUI = true;
items[0]->setSelected(false); items[0]->setSelected(false);
m_view->updateGL();
b_refreshingUI = false; b_refreshingUI = false;
} }
} }
...@@ -105,14 +103,9 @@ void CameraViewDialog::addCameraToList(Camera* c) ...@@ -105,14 +103,9 @@ void CameraViewDialog::addCameraToList(Camera* c)
void CameraViewDialog::removeCameraFromList(Camera* c)