Skip to content

Commit

Permalink
correct style of update
Browse files Browse the repository at this point in the history
  • Loading branch information
vanepp authored and KjellMorgenstern committed Jun 23, 2019
1 parent ae28175 commit 8be4b67
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
6 changes: 2 additions & 4 deletions src/mainwindow/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2972,16 +2972,14 @@ QString MainWindow::getStyleSheetSuffix() {
return "fritzing";
}

void MainWindow::addToMyParts(ModelPart * modelPart, QStringList & m_peAlienFiles)
void MainWindow::addToMyParts(ModelPart * modelPart, QStringList & peAlienFiles)
{
if (modelPart != NULL) {
foreach(QString pathToAddFromPe, m_peAlienFiles) {
foreach(QString pathToAddFromPe, peAlienFiles) {
// DebugDialog::debug(QString("addToMyParts adding %1")
//.arg(pathToAddFromPe));
m_alienFiles << pathToAddFromPe;
m_alienPartsMsg = tr("Do you want to keep the imported parts?");
}
}
m_binManager->addToMyParts(modelPart);
}

Expand Down
2 changes: 1 addition & 1 deletion src/mainwindow/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ protected slots:
bool m_restarting;

QStringList m_alienFiles;
QStringList m_peAlienFiles;
QStringList peAlienFiles;
QString m_alienPartsMsg;
QStringList m_filesReplacedByAlienOnes;

Expand Down
6 changes: 3 additions & 3 deletions src/partseditor/pemainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2296,7 +2296,7 @@ bool PEMainWindow::saveAs(bool overWrite)
setImageAttribute(layers, svgPath);

QString actualPath = m_userPartsFolderSvgPath + svgPath;
m_peAlienFiles << actualPath;
peAlienFiles << actualPath;
bool result = writeXml(actualPath, removeGorn(svg), false);
if (!result) {
// TODO: warn user
Expand All @@ -2307,7 +2307,7 @@ bool PEMainWindow::saveAs(bool overWrite)
QString suffix = QString("%1_%2_%3").arg(m_prefix).arg(m_guid).arg(m_fileIndex++);
QString fzpPath = dir.absoluteFilePath(QString("%1.fzp").arg(suffix));

m_peAlienFiles << fzpPath;
peAlienFiles << fzpPath;
if (overWrite) {
fzpPath = m_originalFzpPath;
}
Expand Down Expand Up @@ -2347,7 +2347,7 @@ bool PEMainWindow::saveAs(bool overWrite)
if (modelPart == NULL) {
modelPart = m_referenceModel->loadPart(fzpPath, true);
modelPart->setAlien(true);
emit addToMyPartsSignal(modelPart, m_peAlienFiles);
emit addToMyPartsSignal(modelPart, peAlienFiles);
}
else {
m_referenceModel->reloadPart(fzpPath, m_originalModuleID);
Expand Down

0 comments on commit 8be4b67

Please sign in to comment.