Skip to content

Commit

Permalink
qmlui: update palette list on project load
Browse files Browse the repository at this point in the history
  • Loading branch information
mcallegari committed Oct 16, 2019
1 parent 12677d9 commit d0a7323
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion qmlui/palettemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ PaletteManager::PaletteManager(QQuickView *view, Doc *doc, QObject *parent)

m_dimmerCount = m_colorCount = m_positionCount = 0;

updatePaletteList();
connect(m_doc, SIGNAL(loaded()), this, SLOT(slotDocLoaded()));
}

PaletteManager::~PaletteManager()
Expand Down Expand Up @@ -155,4 +155,9 @@ void PaletteManager::updatePaletteList()
emit paletteListChanged();
}

void PaletteManager::slotDocLoaded()
{
updatePaletteList();
}


3 changes: 3 additions & 0 deletions qmlui/palettemanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ class PaletteManager : public QObject
void colorCountChanged();
void positionCountChanged();

public slots:
void slotDocLoaded();

private:
/** Reference to the QML view root */
QQuickView *m_view;
Expand Down

0 comments on commit d0a7323

Please sign in to comment.