Merge pull request #3005 from shun-iwasawa/fix_toggle_link_to_studio_palette_to_prevent_edit_immediately
Fix Toggle Link to Studio Palette to Prevent Editing Style Immediately
This commit is contained in:
commit
32b829f00b
1 changed files with 8 additions and 0 deletions
|
@ -62,6 +62,14 @@ void PaletteController::setCurrentPalette(TPaletteHandle *paletteHandle) {
|
|||
// perform signal BROADCASTING to all palette handles implicitly mapping to
|
||||
// the associated palette:
|
||||
|
||||
// in case the handle is not changed, skip the reconnection
|
||||
if (m_originalCurrentPalette == paletteHandle) {
|
||||
if (!paletteHandle) return;
|
||||
m_currentPalette->setPalette(paletteHandle->getPalette(),
|
||||
paletteHandle->getStyleIndex());
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_originalCurrentPalette) {
|
||||
m_originalCurrentPalette->disconnectBroadcasts(m_currentPalette);
|
||||
m_currentPalette->disconnectBroadcasts(m_originalCurrentPalette);
|
||||
|
|
Loading…
Reference in a new issue