Skip to content
Snippets Groups Projects

rm unfinished undo/redo engine (#757)

Merged Wuttke, Joachim requested to merge j.757 into main
2 files
+ 18
18
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -64,7 +64,7 @@ SampleItem* SampleEditorController::sampleItem() const
void SampleEditorController::addLayerItem(LayerItem* before)
{
const int i = (before != nullptr) ? m_sampleItem->layerItems().indexOf(before)
: m_sampleItem->layerItems().size();
: m_sampleItem->layerItems().size();
addLayerItemFromUndo(i);
}
@@ -360,14 +360,14 @@ void SampleEditorController::removeParticle(ItemWithParticles* itemToRemove)
}
}
void SampleEditorController::setDouble(double newValue, DoubleProperty& d)
void SampleEditorController::setDouble(double value, DoubleProperty& d)
{
m_undoStack.push(new CommandChangeValue(d.label(), this, d.value(), newValue, d.uid()));
d.setValue(newValue);
m_undoStack.push(new CommandChangeValue(d.label(), this, d.value(), value, d.uid()));
d.setValue(value);
emit modified();
}
void SampleEditorController::setDoubleFromUndo(double newValue, const QString& path)
void SampleEditorController::setDoubleFromUndo(double value, const QString& path)
{
ASSERT(m_sampleForm);
@@ -382,10 +382,10 @@ void SampleEditorController::setDoubleFromUndo(double newValue, const QString& p
if (!spinBox)
return;
spinBox->setPropertyValue(newValue);
spinBox->setPropertyValue(value);
QSignalBlocker _(spinBox);
spinBox->setBaseValue(newValue);
spinBox->setBaseValue(value);
spinBox->setFocus();
spinBox->selectAll();
@@ -425,10 +425,10 @@ void SampleEditorController::selectMaterial(ItemWithMaterial* item,
emit modified();
}
void SampleEditorController::setMaterialValue(ItemWithMaterial* item, double newValue,
void SampleEditorController::setMaterialValue(ItemWithMaterial* item, double value,
DoubleProperty& d)
{
setDouble(newValue, d);
setDouble(value, d);
// -- notify all other users of this material (update values in the UI)
ASSERT(m_sampleForm);
@@ -440,9 +440,9 @@ void SampleEditorController::setMaterialValue(ItemWithMaterial* item, double new
}
void SampleEditorController::setDensityRelatedValue(InterferenceItem* interferenceItem,
double newValue, DoubleProperty& d)
double value, DoubleProperty& d)
{
setDouble(newValue, d);
setDouble(value, d);
// -- notify the containing particle layout UI about changed value
ASSERT(m_sampleForm);
@@ -519,9 +519,9 @@ void SampleEditorController::selectInterference(InterferenceForm* widget, int ne
emit modified();
}
void SampleEditorController::setIntegrateOverXi(LatticeTypeSelectionForm* widget, bool newValue)
void SampleEditorController::setIntegrateOverXi(LatticeTypeSelectionForm* widget, bool value)
{
widget->interferenceItem()->setXiIntegration(newValue);
widget->interferenceItem()->setXiIntegration(value);
widget->onIntegrateOverXiChanged();
emit modified();
}
Loading