r22802 by jghali - #15534: Deleting guides in Page -> Manage guides broken when rulers not relative to page
scribus-commit
scribus-commit at lists.scribus.net
Sun Jan 13 18:05:00 UTC 2019
Author: jghali
Date: Sun Jan 13 18:04:59 2019
New Revision: 22802
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22802
Log:
#15534: Deleting guides in Page -> Manage guides broken when rulers not relative to page
Modified:
trunk/Scribus/scribus/guidesmodel.cpp
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/ui/guidemanager.cpp
Modified: trunk/Scribus/scribus/guidesmodel.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22802&path=/trunk/Scribus/scribus/guidesmodel.cpp
==============================================================================
--- trunk/Scribus/scribus/guidesmodel.cpp (original)
+++ trunk/Scribus/scribus/guidesmodel.cpp Sun Jan 13 18:04:59 2019
@@ -54,6 +54,8 @@
}
if (role == Qt::EditRole)
return pts2value(m_values.at(index.row()) - m_rule, m_docUnitIndex);
+ if (role == Qt::UserRole)
+ return m_values.at(index.row());
if (role == Qt::BackgroundColorRole && m_values.at(index.row()) == 0.0)
return QVariant(QColor(Qt::red));
@@ -91,7 +93,7 @@
{
beginResetModel();
for (double d : guides)
- m_values.removeAll(value2pts(d, m_docUnitIndex));
+ m_values.removeAll(d);
endResetModel();
}
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22802&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Sun Jan 13 18:04:59 2019
@@ -5864,6 +5864,7 @@
currItem->emitAllToGUI();
}
//TODO emit from selection, handle group widths
+ guidePalette->setupPage();
view->DrawNew();
}
Modified: trunk/Scribus/scribus/ui/guidemanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22802&path=/trunk/Scribus/scribus/ui/guidemanager.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/guidemanager.cpp (original)
+++ trunk/Scribus/scribus/ui/guidemanager.cpp Sun Jan 13 18:04:59 2019
@@ -282,7 +282,7 @@
for (const QModelIndex& ix : indexes)
// here *must* go EditRole due truncations in DisplayRole
// see GuidesModel::data()
- v.append(horizontalModel->data(ix, Qt::EditRole).toDouble());
+ v.append(horizontalModel->data(ix, Qt::UserRole).toDouble());
horizontalModel->removeValues(v);
@@ -300,7 +300,7 @@
for (const QModelIndex& ix : indexes)
// here *must* go EditRole due truncations in DisplayRole
// see GuidesModel::data()
- v.append(verticalModel->data(ix, Qt::EditRole).toDouble());
+ v.append(verticalModel->data(ix, Qt::UserRole).toDouble());
verticalModel->removeValues(v);
More information about the scribus-commit
mailing list