View Issue Details

IDProjectCategoryView StatusLast Update
0015989ScribusUser Interfacepublic2019-12-11 11:35
Reporterrsevero Assigned Tojghali  
PrioritynormalSeverityfeatureReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.5.6.svn 
Target VersionFixed in Version1.5.6.svn 
Summary0015989: Enable Ctrl+Click to select objects below guides
DescriptionIf I have an object below a guide (a line below a single line), I can't click-select it if I using the default "guides above" objects setting.

As Scribus already has a method of selecting objects that are below other objects (repeatly Ctrl-clicking it), I believe that, for the sake of uniformity and consistency, this same method should also work if the desired object is below a guide.

There are several ways for an user to select an object in the situation described but all of them require special knowledge and completely different actions to select an object. The same Ctrl-cliking method should work also here.
Steps To Reproduce1. Create a guide line.

2. Draw a line snaped to the guide line.

3. Click somewhere else to unselect the line

4. Try to select the line clicking on it, pressing or not the Ctrl key

You only manage to select the guide line, not the line.

TagsNo tags attached.
PatchYes

Activities

ale

2019-12-06 13:12

manager   ~0047205

on my computer i don't even have to click the ctrl...
no way to select a guide when it's above a shape border, when the shape is selected.

rsevero

2019-12-06 13:48

reporter   ~0047207

ale, after the object has been already selected, I believe it happens exactly how you described.

But I'm talking about the cenario where there is no object selected at all. In this situation I can't simply click (or Ctrl-click) on the object behind a guide line to sleect it like I can for objects elsewhere.

ale

2019-12-06 14:27

manager   ~0047208

a "normal" item cannot be completely behind a guide...
just click in the middle of it... you don't need to click on the border.

i've tried on a different computer and the ability to click on an item below a guide might depend on he resolution of the screen
if i zoom in and pay attention how the cursor changes i can click on any line or handle below the guide...

but, indeed, we could change the code for the guides to not react when the ctrl key is down...

rsevero

2019-12-06 18:20

reporter   ~0047209

I've experienced this possibility. It's a little bit tricky but it works many times.

But making the guides not react when Ctrl pressed seems much more user friendly to me as it capitalizes on a metaphor already present in Scribus interface.

ale

2019-12-07 13:40

manager   ~0047210

@rsevero , if you have issues with real world cases, please post a .sla showing it.
i'm pretty sure that in (almost) every case there is an easy way to select an item (except a long line that is exactly under the guide).

... until somebody takes the time to check for ctrl when the user clicks on a guide...

ale

2019-12-08 21:33

manager   ~0047213

attached, a patch that prevents the selection of guides, when ctrl is pressed.

guides-item-ctrl-select.diff (2,017 bytes)
diff --git a/scribus/canvasmode_normal.cpp b/scribus/canvasmode_normal.cpp
index 1680fe728..df9a03b91 100644
--- a/scribus/canvasmode_normal.cpp
+++ b/scribus/canvasmode_normal.cpp
@@ -310,7 +310,7 @@ void CanvasMode_Normal::mouseMoveEvent(QMouseEvent *m)
 //	m_mouseCurrentPoint = mousePointDoc;
 	bool movingOrResizing = (m_canvas->m_viewMode.operItemMoving || m_canvas->m_viewMode.operItemResizing);
 	bool mouseIsOnPage    = (m_doc->OnPage(mousePointDoc.x(), mousePointDoc.y()) != -1);
-	if ((m_doc->guidesPrefs().guidesShown) && (!m_doc->GuideLock) && (!movingOrResizing) && (mouseIsOnPage) )
+	if ((m_doc->guidesPrefs().guidesShown) && (!m_doc->GuideLock) && (!movingOrResizing) && (mouseIsOnPage) && !(m->modifiers() & Qt::ControlModifier))
 	{
 		// #9002: Resize points undraggable when object is aligned to a guide
 		// Allow item resize when guides are aligned to item while preserving
@@ -1577,7 +1577,7 @@ bool CanvasMode_Normal::SeleItem(QMouseEvent *m)
 //	QRectF mpo(m_mouseCurrentPoint.x()-grabRadius, m_mouseCurrentPoint.y()-grabRadius, grabRadius*2, grabRadius*2);
 	m_doc->nodeEdit.deselect();
 
-	if (m_doc->guidesPrefs().renderStackOrder.indexOf(3) > m_doc->guidesPrefs().renderStackOrder.indexOf(4)) // guides are on foreground and want to be processed first
+	if (m_doc->guidesPrefs().renderStackOrder.indexOf(3) > m_doc->guidesPrefs().renderStackOrder.indexOf(4) && !(m->modifiers() & Qt::ControlModifier)) // guides are on foreground and want to be processed first
 	{
 		if ((m_doc->guidesPrefs().guidesShown) && (m_doc->OnPage(MxpS, MypS) != -1))
 		{
@@ -1740,7 +1740,7 @@ bool CanvasMode_Normal::SeleItem(QMouseEvent *m)
 			handleFocusIn(currItem);
 		return true;
 	}
-	if ((m_doc->guidesPrefs().guidesShown) /*&& (!m_doc->GuideLock)*/ && (m_doc->OnPage(MxpS, MypS) != -1))
+	if ((m_doc->guidesPrefs().guidesShown) /*&& (!m_doc->GuideLock)*/ && (m_doc->OnPage(MxpS, MypS) != -1) && !(m->modifiers() & Qt::ControlModifier))
 	{
 		if (!m_guideMoveGesture)
 		{

jghali

2019-12-11 11:25

administrator   ~0047246

I committed a somewhat different and improved patch : ctrl-click can now be used not only to select objects below guides, but also to select guides below objects.

rsevero

2019-12-11 11:35

reporter   ~0047248

jghali, it sound's great. I will give it a try. Thanks!!

Issue History

Date Modified Username Field Change
2019-12-06 11:40 rsevero New Issue
2019-12-06 13:12 ale Note Added: 0047205
2019-12-06 13:48 rsevero Note Added: 0047207
2019-12-06 14:27 ale Note Added: 0047208
2019-12-06 18:20 rsevero Note Added: 0047209
2019-12-07 13:40 ale Note Added: 0047210
2019-12-08 21:33 ale File Added: guides-item-ctrl-select.diff
2019-12-08 21:33 ale Note Added: 0047213
2019-12-08 21:34 ale Summary Enabled Ctrl clicking in objects to select objects below guides => [PATCH] Enabled Ctrl clicking in objects to select objects below guides
2019-12-08 21:34 ale Patch No => Yes
2019-12-11 11:15 jghali Summary [PATCH] Enabled Ctrl clicking in objects to select objects below guides => Enable Ctrl+Click to select objects below guides
2019-12-11 11:25 jghali Note Added: 0047246
2019-12-11 11:26 jghali Assigned To => jghali
2019-12-11 11:26 jghali Status new => resolved
2019-12-11 11:26 jghali Resolution open => fixed
2019-12-11 11:26 jghali Fixed in Version => 1.5.6.svn
2019-12-11 11:35 rsevero Note Added: 0047248