mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-07-17 05:34:50 -04:00
Solving Gnome Palette Editor problem
This commit is contained in:
@ -117,6 +117,17 @@ map<size_t, float> PaletteEditor::GetColorIndices() const
|
||||
return m_GradientColorView->GetColorIndices();
|
||||
}
|
||||
|
||||
// michel
|
||||
/// <summary>
|
||||
/// Return the previous xform color indices as a map.
|
||||
/// The keys are the xform indices, and the values are the color indices.
|
||||
/// </summary>
|
||||
/// <returns>The color indices</returns>
|
||||
map<size_t, float> PaletteEditor::GetPreviousColorIndices() const
|
||||
{
|
||||
return m_PreviousColorIndices;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Assign the values of the xform color indices to the arrows.
|
||||
/// This will clear out any existing values first.
|
||||
@ -127,6 +138,16 @@ void PaletteEditor::SetColorIndices(const map<size_t, float>& indices)
|
||||
m_GradientColorView->SetColorIndices(indices);
|
||||
}
|
||||
|
||||
// michel
|
||||
/// <summary>
|
||||
/// Backup xform color
|
||||
/// </summary>
|
||||
/// <param name="indices">The color indices to backup</param>
|
||||
void PaletteEditor::SetPreviousColorIndices(const map<size_t, float>& indices)
|
||||
{
|
||||
m_PreviousColorIndices = indices;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return the filename of the currently selected palette.
|
||||
/// Note this will only be filled in if the user has clicked in the palette
|
||||
@ -636,4 +657,4 @@ void PaletteEditor::EnablePaletteControls()
|
||||
bool PaletteEditor::IsCurrentPaletteAndFileEditable()
|
||||
{
|
||||
return m_PaletteList->IsModifiable(m_CurrentPaletteFilePath) && !m_GradientColorView->GetPalette(256).m_SourceColors.empty();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user