Commit 99686812 authored by Sylvain Thery's avatar Sylvain Thery

add slot for selecting map from python console

parent 9a03f38e
......@@ -31,6 +31,8 @@ public:
unsigned int getCurrentOrbit();
CellSelectorGen* getSelectedSelector(unsigned int orbit) { return m_selectedSelector[orbit]; }
void setSelectedMap(const QString& mapName);
private slots:
// slots called from UI actions
void selectedMapChanged();
......
......@@ -90,6 +90,7 @@ private slots:
public slots:
MapHandlerGen* addMap(const QString& name, unsigned int dim);
void removeMap(const QString& name);
void setSelectedMap(const QString& mapName);
MapHandlerGen* getMap(const QString& name) const;
const MapSet& getMapSet() const { return m_maps; }
......
......@@ -447,6 +447,17 @@ void ControlDock_MapTab::updateSelectedMapInfo()
b_updatingUI = false;
}
void ControlDock_MapTab::setSelectedMap(const QString& mapName)
{
QList<QListWidgetItem *> lm = list_maps->findItems(mapName,Qt::MatchExactly);
if (!lm.empty())
{
lm[0]->setSelected(true);
}
}
} // namespace SCHNApps
} // namespace CGoGN
......@@ -520,6 +520,11 @@ void SCHNApps::removeMap(const QString& name)
}
}
void SCHNApps::setSelectedMap(const QString& mapName)
{
m_controlMapTab->setSelectedMap(mapName);
}
MapHandlerGen* SCHNApps::getMap(const QString& name) const
{
if (m_maps.contains(name))
......
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