r20582 by craig -
scribus-commit
scribus-commit at lists.scribus.net
Wed Nov 25 23:18:09 UTC 2015
Author: craig
Date: Wed Nov 25 23:18:09 2015
New Revision: 20582
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20582
Log:
#13565: Fix rounded corners value not being set to 0 when a shape other than a rectangle is changed, plus fix an item redraw issue
Modified:
trunk/Scribus/scribus/scribusdoc.cpp
trunk/Scribus/scribus/ui/propertiespalette_shape.cpp
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20582&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Wed Nov 25 23:18:09 2015
@@ -10082,6 +10082,7 @@
}
currItem->SetFrameRound();
setRedrawBounding(currItem);
+ qDebug()<<"boo";
regionsChanged()->update(currItem->getRedrawBounding(1.0));
}
}
@@ -11597,7 +11598,12 @@
{
if ((item->itemType() == PageItem::PolyLine) || (item->itemType() == PageItem::PathText))
return;
-
+ UndoTransaction activeTransaction;
+ if (undoManager->undoEnabled())
+ activeTransaction = undoManager->beginTransaction(Um::Selection,Um::IImageFrame,Um::ChangeShapeType,"",Um::IBorder);
+
+ if (frameType!=0)
+ item->setCornerRadius(0);
if (UndoManager::undoEnabled())
{
// Store shape info in this form:
@@ -11659,6 +11665,8 @@
}
item->update();
changed();
+ if (activeTransaction)
+ activeTransaction.commit();
}
void ScribusDoc::itemSelection_ClearItem(Selection* customSelection, bool useWarning)
Modified: trunk/Scribus/scribus/ui/propertiespalette_shape.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20582&path=/trunk/Scribus/scribus/ui/propertiespalette_shape.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_shape.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_shape.cpp Wed Nov 25 23:18:09 2015
@@ -11,6 +11,7 @@
#define _USE_MATH_DEFINES
#endif
#include <cmath>
+#include <QSignalBlocker>
#include "appmodes.h"
#include "autoform.h"
@@ -481,6 +482,7 @@
m_doc->changed();
//called from setFrameRounded already!
m_doc->regionsChanged()->update(QRect());
+ m_item->update();
}
void PropertiesPalette_Shape::handleFillRule()
@@ -499,21 +501,13 @@
{
if ((m_item->itemType() == PageItem::PolyLine) || (m_item->itemType() == PageItem::PathText))
return;
-
+ bool b = roundRect->blockSignals(true);
m_doc->item_setFrameShape(m_item, f, c, vals);
-
- //ScribusDoc::changed() is called in item_setFrameShape()
- //Hope this is enough
- //emit DocChanged();
-
+ roundRect->setValue(m_item->cornerRadius()*m_unitRatio);
+ roundRect->setEnabled(f == 0);
+ roundRect->blockSignals(b);
if ((m_item->itemType() == PageItem::ImageFrame) || (m_item->itemType() == PageItem::TextFrame))
- {
- roundRect->setEnabled(f == 0);
return;
- }
-// m_item->convertTo(PageItem::Polygon);
-// newSelection(6);
- roundRect->setEnabled(f == 0);
m_doc->invalidateAll();
m_doc->regionsChanged()->update(QRect());
}
More information about the scribus-commit
mailing list