View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0016950 | Scribus | User Interface | public | 2023-05-29 19:26 | 2023-09-11 20:34 |
| Reporter | ale | Assigned To | nitramr | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 1.7.0.svn | ||||
| Fixed in Version | 1.7.0.svn | ||||
| Summary | 0016950: basepoint rotation widget is not reset when unselecting the current frame | ||||
| Description | - rotate a frame - the new base point widget gets also rotated - deselect the shape - the base point widget is deactivated but still rotated ... it just looks a bit strange. i would prefer to have it set back to the default 9 base points widget (this is also valid when deselecting a line) | ||||
| Tags | No tags attached. | ||||
| Patch | No | ||||
|
|
fix attached basepoint_fix.patch (4,170 bytes)
Index: scribus/canvasmode_rotate.cpp
===================================================================
--- scribus/canvasmode_rotate.cpp (Revision 25488)
+++ scribus/canvasmode_rotate.cpp (Arbeitskopie)
@@ -499,60 +499,57 @@
m_oldRotCenter = m_rotCenter = m_view->RCenter;
m_doc->m_Selection->getVisualGroupRect(&gx, &gy, &gw, &gh);
m_rotMode = m_doc->rotationMode();
-
- switch(m_rotMode){
- case AnchorPoint::TopLeft:
+
+ switch(m_rotMode){
+ case AnchorPoint::TopLeft:
m_rotCenter = FPoint(gx, gy);
- break;
- case AnchorPoint::Top:
- m_rotCenter = FPoint(gx + gw / 2.0, gy);
- break;
- case AnchorPoint::TopRight:
+ break;
+ case AnchorPoint::Top:
+ m_rotCenter = FPoint(gx + gw / 2.0, gy);
+ break;
+ case AnchorPoint::TopRight:
m_rotCenter = FPoint(gx + gw, gy);
- break;
- case AnchorPoint::Left:
- m_rotCenter = FPoint(gx, gy + gh / 2.0);
- break;
- case AnchorPoint::Right:
- m_rotCenter = FPoint(gx + gw, gy + gh / 2.0);
- break;
- case AnchorPoint::BottomLeft:
+ break;
+ case AnchorPoint::Left:
+ m_rotCenter = FPoint(gx, gy + gh / 2.0);
+ break;
+ case AnchorPoint::Right:
+ m_rotCenter = FPoint(gx + gw, gy + gh / 2.0);
+ break;
+ case AnchorPoint::BottomLeft:
m_rotCenter = FPoint(gx, gy + gh);
- break;
- case AnchorPoint::Bottom:
- m_rotCenter = FPoint(gx + gw / 2.0, gy + gh);
- break;
- case AnchorPoint::BottomRight:
+ break;
+ case AnchorPoint::Bottom:
+ m_rotCenter = FPoint(gx + gw / 2.0, gy + gh);
+ break;
+ case AnchorPoint::BottomRight:
m_rotCenter = FPoint(gx + gw, gy + gh);
- break;
- case AnchorPoint::Center:
- default:
- m_rotCenter = FPoint(gx + gw / 2.0, gy + gh / 2.0);
- break;
- }
-
+ break;
+ case AnchorPoint::Center:
+ default:
+ m_rotCenter = FPoint(gx + gw / 2.0, gy + gh / 2.0);
+ break;
+ }
+
}
}
void CanvasMode_Rotate::keyReleaseEvent(QKeyEvent *e)
{
- if (e->key() == Qt::Key_Up)
- {
- auto id = m_view->m_ScMW->propertiesPalette->xyzPal->basePointWidget->selectedAnchor();
- //id = id > 0 ? id - 1 : 4;
- m_view->m_ScMW->propertiesPalette->xyzPal->basePointWidget->setSelectedAnchor(id);
- m_doc->setRotationMode(id);
- return;
- }
- if (e->key() == Qt::Key_Down)
- {
- auto id = m_view->m_ScMW->propertiesPalette->xyzPal->basePointWidget->selectedAnchor();
- //id = (id + 1) % 5;
- m_view->m_ScMW->propertiesPalette->xyzPal->basePointWidget->setSelectedAnchor(id);
- m_doc->setRotationMode(id);
- return;
- }
+ if(e->key() == Qt::Key_Up || e->key() == Qt::Key_Down)
+ {
+ int id = m_view->m_ScMW->propertiesPalette->xyzPal->basePointWidget->selectedAnchor();
+ if (e->key() == Qt::Key_Up) id = id > 1 ? id - 1 : 9;
+ if (e->key() == Qt::Key_Down) id = id < 9 ? id + 1 : 1;
+
+ AnchorPoint ap = static_cast<AnchorPoint>(id);
+ m_view->m_ScMW->propertiesPalette->xyzPal->basePointWidget->setSelectedAnchor(ap);
+ m_doc->setRotationMode(ap);
+ return;
+
+ }
+
double increment = 0.0;
if (e->key() == Qt::Key_Left)
increment = 1.0;
Index: scribus/scribusstructs.h
===================================================================
--- scribus/scribusstructs.h (Revision 25488)
+++ scribus/scribusstructs.h (Arbeitskopie)
@@ -483,8 +483,8 @@
Center = 5,
Right = 6,
BottomLeft = 7,
- Bottom = 9,
- BottomRight = 10
+ Bottom = 8,
+ BottomRight = 9
};
#endif
Index: scribus/ui/propertiespalette_xyz.cpp
===================================================================
--- scribus/ui/propertiespalette_xyz.cpp (Revision 25488)
+++ scribus/ui/propertiespalette_xyz.cpp (Arbeitskopie)
@@ -187,6 +187,7 @@
widthSpin->showValue(0);
heightSpin->showValue(0);
rotationSpin->showValue(0);
+ basePointWidget->setAngle(0);
setEnabled(false);
}
@@ -447,6 +448,7 @@
widthSpin->showValue(gw);
heightSpin->showValue(gh);
rotationSpin->showValue(0);
+ basePointWidget->setAngle(0);
xposSpin->setEnabled(true);
yposSpin->setEnabled(true);
@@ -516,6 +518,7 @@
widthSpin->showValue(0);
heightSpin->showValue(0);
rotationSpin->showValue(0);
+ basePointWidget->setAngle(0);
levelLabel->setText(" ");
setEnabled(false);
break;
|
|
|
Thanks. I applied only the parts of the patch related to this issue. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2023-05-29 19:26 | ale | New Issue | |
| 2023-05-29 19:26 | ale | Status | new => assigned |
| 2023-05-29 19:26 | ale | Assigned To | => nitramr |
| 2023-05-29 19:28 | ale | Summary | basepoint rotation is not reset when unselecting the current frame => basepoint rotation widget is not reset when unselecting the current frame |
| 2023-06-03 20:44 | nitramr | Note Added: 0050207 | |
| 2023-06-03 20:44 | nitramr | File Added: basepoint_fix.patch | |
| 2023-06-03 22:29 | jghali | Status | assigned => resolved |
| 2023-06-03 22:29 | jghali | Resolution | open => fixed |
| 2023-06-03 22:29 | jghali | Fixed in Version | => 1.7.0.svn |
| 2023-06-03 22:29 | jghali | Note Added: 0050208 | |
| 2023-09-11 20:34 | cbradney | Status | resolved => closed |