Connect to BrushPopup::BrushChange just one time

This commit is contained in:
David Capello 2015-04-29 16:34:21 -03:00
parent 2932add184
commit f5b7fd84dc

View File

@ -67,6 +67,7 @@ public:
, m_bitmap(BrushPopup::createSurfaceForBrush(BrushRef(nullptr)))
, m_popupWindow(this) {
addItem(m_bitmap);
m_popupWindow.BrushChange.connect(&BrushTypeField::onBrushChange, this);
}
~BrushTypeField() {
@ -131,7 +132,6 @@ private:
m_popupWindow.setHotRegion(rgn);
m_popupWindow.openWindow();
m_popupWindow.BrushChange.connect(&BrushTypeField::onBrushChange, this);
}
void closePopup() {