mirror of
				https://bitbucket.org/mfeemster/fractorium.git
				synced 2025-10-31 09:20:23 -04:00 
			
		
		
		
	Solving Linux-Gnome Palette Editor problem
This commit is contained in:
		| @ -21,7 +21,7 @@ | ||||
|  | ||||
| class GLWidget; | ||||
| class QssDialog; | ||||
| class PaletteEditor; // michel | ||||
| class PaletteEditor; | ||||
| class FractoriumOptionsDialog; | ||||
| class FractoriumVariationsDialog; | ||||
| class FractoriumFinalRenderDialog; | ||||
| @ -360,7 +360,7 @@ public slots: | ||||
| 	void OnPaletteEditorColorChanged(); | ||||
| 	void OnPaletteEditorFileChanged(); | ||||
| 	void OnPaletteEditorColorIndexChanged(size_t index, float value); | ||||
|     void OnPaletteEditorFinished(int result); // michel | ||||
|     void OnPaletteEditorFinished(int result); | ||||
|  | ||||
| 	//Info. | ||||
| 	void OnSummaryTableHeaderResized(int logicalIndex, int oldSize, int newSize); | ||||
|  | ||||
| @ -249,7 +249,7 @@ public: | ||||
| 	virtual void SetBasePaletteAndAdjust(const Palette<float>& palette) { } | ||||
| 	virtual void PaletteEditorButtonClicked() { } | ||||
| 	virtual void PaletteEditorColorChanged() { } | ||||
|     virtual void SyncPalette(bool accepted) { } // michel | ||||
|     virtual void SyncPalette(bool accepted) { } | ||||
| 	QImage& FinalPaletteImage() { return m_FinalPaletteImage; } | ||||
|  | ||||
| 	//Info. | ||||
| @ -311,7 +311,7 @@ protected: | ||||
| 	unique_ptr<EmberNs::RendererBase> m_Renderer; | ||||
| 	QTIsaac<ISAAC_SIZE, ISAAC_INT> m_Rand; | ||||
| 	Fractorium* m_Fractorium; | ||||
|     Palette<float> m_TempPalette, m_PreviosTempPalette; // michel | ||||
|     Palette<float> m_TempPalette, m_PreviosTempPalette; | ||||
| 	std::unique_ptr<QTimer> m_RenderTimer; | ||||
| 	std::unique_ptr<QTimer> m_RenderRestartTimer; | ||||
| 	shared_ptr<PaletteList<float>> m_PaletteList; | ||||
| @ -538,7 +538,7 @@ public: | ||||
| 	virtual void SetBasePaletteAndAdjust(const Palette<float>& palette) override; | ||||
| 	virtual void PaletteEditorButtonClicked() override; | ||||
| 	virtual void PaletteEditorColorChanged() override; | ||||
|     virtual void SyncPalette(bool accepted) override; // michel | ||||
|     virtual void SyncPalette(bool accepted) override; | ||||
|  | ||||
| 	//Info. | ||||
| 	virtual void FillSummary() override; | ||||
|  | ||||
| @ -396,11 +396,11 @@ void FractoriumEmberController<T>::PaletteEditorButtonClicked() | ||||
| 	ed->SetColorIndices(colorIndices); | ||||
| 	ed->SetPaletteFile(m_CurrentPaletteFilePath); | ||||
|  | ||||
|     // michel - waiting to be approved - may be used with IFDEF LINUX | ||||
| #ifdef __linux__ | ||||
|     m_PreviosTempPalette = m_TempPalette; | ||||
|     ed->SetPreviousColorIndices(colorIndices); | ||||
|     ed->show(); | ||||
|     return; | ||||
| #else | ||||
|  | ||||
| 	//ed->setpal | ||||
| 	if (ed->exec() == QDialog::Accepted) | ||||
| @ -430,6 +430,7 @@ void FractoriumEmberController<T>::PaletteEditorButtonClicked() | ||||
| 	//Whether the current palette file was changed or not, if it's modifiable then reload it just to be safe (even though it might be overkill). | ||||
| 	if (m_PaletteList->IsModifiable(m_CurrentPaletteFilePath)) | ||||
| 		m_Fractorium->OnPaletteFilenameComboChanged(QString::fromStdString(m_CurrentPaletteFilePath)); | ||||
| #endif | ||||
| } | ||||
|  | ||||
| /// <summary> | ||||
| @ -454,7 +455,9 @@ void Fractorium::OnPaletteEditorButtonClicked(bool checked) | ||||
| 		connect(m_PaletteEditor, SIGNAL(PaletteChanged()),                 this, SLOT(OnPaletteEditorColorChanged()), Qt::QueuedConnection); | ||||
| 		connect(m_PaletteEditor, SIGNAL(PaletteFileChanged()),             this, SLOT(OnPaletteEditorFileChanged()), Qt::QueuedConnection); | ||||
| 		connect(m_PaletteEditor, SIGNAL(ColorIndexChanged(size_t, float)), this, SLOT(OnPaletteEditorColorIndexChanged(size_t, float)), Qt::QueuedConnection); | ||||
|         connect(m_PaletteEditor, SIGNAL(finished(int)),                    this, SLOT(OnPaletteEditorFinished(int)), Qt::QueuedConnection); // michel | ||||
| #ifdef __linux__ | ||||
|         connect(m_PaletteEditor, SIGNAL(finished(int)),                    this, SLOT(OnPaletteEditorFinished(int)), Qt::QueuedConnection); | ||||
| #endif | ||||
| 	} | ||||
|  | ||||
| 	m_PaletteChanged = false; | ||||
| @ -462,7 +465,6 @@ void Fractorium::OnPaletteEditorButtonClicked(bool checked) | ||||
| 	m_Controller->PaletteEditorButtonClicked(); | ||||
| } | ||||
|  | ||||
| // michel | ||||
| /// <summary> | ||||
| /// Slot called when palette editor window is closed. | ||||
| /// </summary> | ||||
| @ -549,7 +551,6 @@ void Fractorium::OnPaletteEditorColorIndexChanged(size_t index, float value) | ||||
| 		OnXformColorIndexChanged(value, true, true, true, eXformUpdate::UPDATE_SPECIFIC, index); | ||||
| } | ||||
|  | ||||
| // michel | ||||
| /// Slot called after EditPallete is closed. | ||||
| /// </summary> | ||||
| /// <param name="result">Cancel/OK action</param> | ||||
|  | ||||
| @ -117,7 +117,6 @@ 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. | ||||
| @ -138,7 +137,6 @@ void PaletteEditor::SetColorIndices(const map<size_t, float>& indices) | ||||
| 	m_GradientColorView->SetColorIndices(indices); | ||||
| } | ||||
|  | ||||
| // michel | ||||
| /// <summary> | ||||
| /// Backup xform color | ||||
| /// </summary> | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "FractoriumPch.h" | ||||
| #include "Fractorium.h" // michel | ||||
| #include "Fractorium.h" | ||||
| #include "ColorPickerWidget.h" | ||||
| #include "GradientColorsView.h" | ||||
| #include "EmberFile.h" | ||||
| @ -34,9 +34,9 @@ public: | ||||
| 	Palette<float>& GetPalette(int size); | ||||
| 	void SetPalette(const Palette<float>& palette); | ||||
| 	map<size_t, float> GetColorIndices() const; | ||||
|     map<size_t, float> GetPreviousColorIndices() const; // michel | ||||
|     map<size_t, float> GetPreviousColorIndices() const; | ||||
| 	void SetColorIndices(const map<size_t, float>& indices); | ||||
|     void SetPreviousColorIndices(const map<size_t, float>& indices); // michel | ||||
|     void SetPreviousColorIndices(const map<size_t, float>& indices); | ||||
| 	string GetPaletteFile() const; | ||||
| 	void SetPaletteFile(const string& filename); | ||||
|  | ||||
| @ -80,7 +80,7 @@ private: | ||||
| 	bool IsCurrentPaletteAndFileEditable(); | ||||
| 	bool m_PaletteFileChanged = false; | ||||
| 	int m_PaletteIndex = 0; | ||||
|     map<size_t, float> m_PreviousColorIndices; // michel | ||||
|     map<size_t, float> m_PreviousColorIndices; | ||||
| 	QString m_Filename; | ||||
| 	string m_CurrentPaletteFilePath; | ||||
| 	ColorPickerWidget* m_ColorPicker = nullptr; | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Michel Mastriani
					Michel Mastriani