Commit 895926cd authored by Pierre Kraemer's avatar Pierre Kraemer

debug some selection problems

parent 88b0df6d
...@@ -148,6 +148,7 @@ public slots: ...@@ -148,6 +148,7 @@ public slots:
CellSelectorGen* getCellSelector(unsigned int orbit, const QString& name) const; CellSelectorGen* getCellSelector(unsigned int orbit, const QString& name) const;
const CellSelectorSet& getCellSelectorSet(unsigned int orbit) const { return m_cellSelectors[orbit]; } const CellSelectorSet& getCellSelectorSet(unsigned int orbit) const { return m_cellSelectors[orbit]; }
private slots:
void selectedCellsChanged(); void selectedCellsChanged();
public: public:
......
...@@ -98,6 +98,7 @@ public slots: ...@@ -98,6 +98,7 @@ public slots:
MapHandlerGen* getSelectedMap() const; MapHandlerGen* getSelectedMap() const;
unsigned int getCurrentOrbit() const; unsigned int getCurrentOrbit() const;
void notifySelectedCellSelectorChanged(CellSelectorGen* cs) { emit(selectedCellSelectorChanged(cs)); }
CellSelectorGen* getSelectedSelector(unsigned int orbit) const; CellSelectorGen* getSelectedSelector(unsigned int orbit) const;
/********************************************************* /*********************************************************
...@@ -140,6 +141,7 @@ signals: ...@@ -140,6 +141,7 @@ signals:
void mapAdded(MapHandlerGen* map); void mapAdded(MapHandlerGen* map);
void mapRemoved(MapHandlerGen* map); void mapRemoved(MapHandlerGen* map);
void selectedMapChanged(MapHandlerGen* old, MapHandlerGen* cur); void selectedMapChanged(MapHandlerGen* old, MapHandlerGen* cur);
void selectedCellSelectorChanged(CellSelectorGen* cs);
void pluginAvailableAdded(QString name); void pluginAvailableAdded(QString name);
void pluginEnabled(Plugin* plugin); void pluginEnabled(Plugin* plugin);
......
...@@ -157,7 +157,10 @@ void ControlDock_MapTab::selectedSelectorChanged() ...@@ -157,7 +157,10 @@ void ControlDock_MapTab::selectedSelectorChanged()
case VOLUME: items = list_volumeSelectors->selectedItems(); break; case VOLUME: items = list_volumeSelectors->selectedItems(); break;
} }
if(!items.empty()) if(!items.empty())
{
m_selectedSelector[orbit] = m_selectedMap->getCellSelector(orbit, items[0]->text()); m_selectedSelector[orbit] = m_selectedMap->getCellSelector(orbit, items[0]->text());
m_schnapps->notifySelectedCellSelectorChanged(m_selectedSelector[orbit]);
}
} }
} }
} }
......
...@@ -35,6 +35,7 @@ View::View(const QString& name, SCHNApps* s, const QGLWidget* shareWidget) : ...@@ -35,6 +35,7 @@ View::View(const QString& name, SCHNApps* s, const QGLWidget* shareWidget) :
m_currentCamera = m_schnapps->addCamera(); m_currentCamera = m_schnapps->addCamera();
connect(m_schnapps, SIGNAL(selectedMapChanged(MapHandlerGen*,MapHandlerGen*)), this, SLOT(selectedMapChanged(MapHandlerGen*,MapHandlerGen*))); connect(m_schnapps, SIGNAL(selectedMapChanged(MapHandlerGen*,MapHandlerGen*)), this, SLOT(selectedMapChanged(MapHandlerGen*,MapHandlerGen*)));
connect(m_schnapps, SIGNAL(selectedCellSelectorChanged(CellSelectorGen*)), this, SLOT(updateGL()));
} }
View::~View() View::~View()
...@@ -162,7 +163,7 @@ void View::unlinkMap(MapHandlerGen* map) ...@@ -162,7 +163,7 @@ void View::unlinkMap(MapHandlerGen* map)
updateGL(); updateGL();
disconnect(map->getFrame(), SIGNAL(modified()), this, SLOT(updateGL())); disconnect(map->getFrame(), SIGNAL(modified()), this, SLOT(updateGL()));
disconnect(map, SIGNAL(selectedCellsChanged()), this, SLOT(updateGL())); disconnect(map, SIGNAL(selectedCellsChanged(CellSelectorGen*)), this, SLOT(updateGL()));
if(map == m_schnapps->getSelectedMap()) if(map == m_schnapps->getSelectedMap())
setManipulatedFrame(NULL); setManipulatedFrame(NULL);
......
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