r15729 by fschmid - Fixed Bug #9426: "Adding guides doesn't change document status"
scribus-commit
scribus-commit at lists.scribus.net
Tue Nov 2 22:29:47 CET 2010
Author: fschmid
Date: Tue Nov 2 21:29:47 2010
New Revision: 15729
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=15729
Log:
Fixed Bug #9426: "Adding guides doesn't change document status"
Modified:
branches/Version135/Scribus/scribus/canvasgesture_rulermove.cpp
branches/Version135/Scribus/scribus/guidemanager.cpp
Modified: branches/Version135/Scribus/scribus/canvasgesture_rulermove.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15729&path=/branches/Version135/Scribus/scribus/canvasgesture_rulermove.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/canvasgesture_rulermove.cpp (original)
+++ branches/Version135/Scribus/scribus/canvasgesture_rulermove.cpp Tue Nov 2 21:29:47 2010
@@ -181,6 +181,7 @@
m_guide = mousePointDoc.y() - m_doc->Pages->at(page)->yOffset();
m_page = page;
m_haveGuide = true;
+ m_doc->changed();
}
}
else if (mouseRelease)
@@ -193,11 +194,12 @@
m_doc->Pages->at(page)->guides.addHorizontal(mousePointDoc.y() - m_doc->Pages->at(page)->yOffset(), GuideManagerCore::Standard);
m_page = page;
}
+ m_doc->changed();
}
else
{
- QCursor* cursor = qApp->overrideCursor();
- if (cursor && (cursor->shape() != Qt::SplitVCursor))
+ QCursor* cursor = qApp->overrideCursor();
+ if (cursor && (cursor->shape() != Qt::SplitVCursor))
qApp->changeOverrideCursor(QCursor(Qt::SplitVCursor));
}
m_currentGuide = mousePointDoc.y() - m_doc->Pages->at(page)->yOffset();
@@ -211,6 +213,7 @@
{
m_doc->Pages->at(m_page)->guides.deleteHorizontal( m_guide, GuideManagerCore::Standard);
m_haveGuide = false;
+ m_doc->changed();
}
}
}
@@ -232,6 +235,7 @@
m_guide = mousePointDoc.x() - m_doc->Pages->at(page)->xOffset();
m_page = page;
m_haveGuide = true;
+ m_doc->changed();
}
}
else if (mouseRelease)
@@ -244,11 +248,12 @@
m_doc->Pages->at(page)->guides.addVertical(mousePointDoc.x() - m_doc->Pages->at(page)->xOffset(), GuideManagerCore::Standard);
m_page = page;
}
+ m_doc->changed();
}
else
{
- QCursor* cursor = qApp->overrideCursor();
- if (cursor && (cursor->shape() != Qt::SplitHCursor))
+ QCursor* cursor = qApp->overrideCursor();
+ if (cursor && (cursor->shape() != Qt::SplitHCursor))
qApp->changeOverrideCursor(QCursor(Qt::SplitHCursor));
}
m_currentGuide = mousePointDoc.x() - m_doc->Pages->at(page)->xOffset();
@@ -262,6 +267,7 @@
{
m_doc->Pages->at(m_page)->guides.deleteVertical( m_guide, GuideManagerCore::Standard);
m_haveGuide = false;
+ m_doc->changed();
}
}
}
Modified: branches/Version135/Scribus/scribus/guidemanager.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15729&path=/branches/Version135/Scribus/scribus/guidemanager.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/guidemanager.cpp (original)
+++ branches/Version135/Scribus/scribus/guidemanager.cpp Tue Nov 2 21:29:47 2010
@@ -310,6 +310,7 @@
currentPage->guides.clearHorizontals(GuideManagerCore::Standard);
currentPage->guides.addHorizontals(horizontalModel->values(), GuideManagerCore::Standard);
drawGuides();
+ m_Doc->changed();
}
void GuideManager::delVerButton_clicked()
@@ -328,6 +329,7 @@
currentPage->guides.clearVerticals(GuideManagerCore::Standard);
currentPage->guides.addVerticals(verticalModel->values(), GuideManagerCore::Standard);
drawGuides();
+ m_Doc->changed();
}
void GuideManager::addHorButton_clicked()
@@ -365,6 +367,7 @@
storePageValues(tmpPage);
}
drawGuides();
+ m_Doc->changed();
}
void GuideManager::applyToAllStdButton_clicked()
@@ -387,12 +390,14 @@
horizontalAutoGapSpin->setEnabled(false);
currentPage->guides.setHorizontalAutoCount(val);
drawGuides();
+ m_Doc->changed();
}
void GuideManager::horizontalAutoGapSpin_valueChanged(double)
{
currentPage->guides.setHorizontalAutoGap(value2pts(horizontalAutoGapSpin->value(), docUnitIndex));
drawGuides();
+ m_Doc->changed();
}
void GuideManager::horizontalAutoGapCheck_stateChanged( int )
@@ -403,6 +408,7 @@
else
currentPage->guides.setHorizontalAutoGap(0.0);
drawGuides();
+ m_Doc->changed();
}
void GuideManager::verticalAutoCountSpin_valueChanged(int val)
@@ -415,12 +421,14 @@
verticalAutoGapSpin->setEnabled(false);
currentPage->guides.setVerticalAutoCount(val);
drawGuides();
+ m_Doc->changed();
}
void GuideManager::verticalAutoGapSpin_valueChanged(double)
{
currentPage->guides.setVerticalAutoGap(value2pts(verticalAutoGapSpin->value(), docUnitIndex));
drawGuides();
+ m_Doc->changed();
}
void GuideManager::verticalAutoGapCheck_stateChanged( int )
@@ -431,6 +439,7 @@
else
currentPage->guides.setVerticalAutoGap(0.0);
drawGuides();
+ m_Doc->changed();
}
void GuideManager::tabWidget_currentChanged(QWidget *)
@@ -488,12 +497,14 @@
{
horizontalModel->setValues(currentPage->guides.horizontals(GuideManagerCore::Standard));
drawGuides();
+ m_Doc->changed();
}
void GuideManager::clearRestoreVerticalList()
{
verticalModel->setValues(currentPage->guides.verticals(GuideManagerCore::Standard));
drawGuides();
+ m_Doc->changed();
}
void GuideManager::deletePageButton_clicked()
@@ -520,6 +531,7 @@
trans.commit();
drawGuides();
+ m_Doc->changed();
}
void GuideManager::deleteAllGuides_clicked()
@@ -535,6 +547,7 @@
m_drawGuides = true;
trans.commit();
drawGuides();
+ m_Doc->changed();
}
void GuideManager::windowActivationChange(bool oldActive)
@@ -620,6 +633,7 @@
currentPage->guides.clearVerticals(GuideManagerCore::Standard);
currentPage->guides.addVerticals(verticalModel->values(), GuideManagerCore::Standard);
drawGuides();
+ m_Doc->changed();
}
void GuideManager::horizontalModel_valueChanged()
@@ -627,6 +641,7 @@
currentPage->guides.clearHorizontals(GuideManagerCore::Standard);
currentPage->guides.addHorizontals(horizontalModel->values(), GuideManagerCore::Standard);
drawGuides();
+ m_Doc->changed();
}
void GuideManager::setHorizontalRefer(int button)
@@ -687,6 +702,7 @@
return;
currentPage->guides.setHorizontalAutoRefer(0);
drawGuides();
+ m_Doc->changed();
}
void GuideManager::horizontalMarginsAutoButton_toggled(bool state)
@@ -695,6 +711,7 @@
return;
currentPage->guides.setHorizontalAutoRefer(1);
drawGuides();
+ m_Doc->changed();
}
void GuideManager::horizontalSelectionAutoButton_toggled(bool state)
@@ -705,6 +722,7 @@
if (horizontalSelectionAutoButton->isEnabled())
resetSelectionForPage();
drawGuides();
+ m_Doc->changed();
}
void GuideManager::verticalPageAutoButton_toggled(bool state)
@@ -713,6 +731,7 @@
return;
currentPage->guides.setVerticalAutoRefer(0);
drawGuides();
+ m_Doc->changed();
}
void GuideManager::verticalMarginsAutoButton_toggled(bool state)
@@ -721,6 +740,7 @@
return;
currentPage->guides.setVerticalAutoRefer(1);
drawGuides();
+ m_Doc->changed();
}
void GuideManager::verticalSelectionAutoButton_toggled(bool state)
@@ -731,4 +751,5 @@
if (verticalSelectionAutoButton->isEnabled())
resetSelectionForPage();
drawGuides();
-}
+ m_Doc->changed();
+}
More information about the scribus-commit
mailing list