| Summary: | outliner some interaction suggestions | ||
|---|---|---|---|
| Product: | [Applications] calligrastage | Reporter: | Thomas Zander <zander> |
| Component: | usability | Assignee: | T Zachmann <t.zachmann> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | normal | CC: | info |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| URL: | https://community.kde.org/Calligra/Ideas/Outliners | ||
| See Also: | https://bugs.kde.org/show_bug.cgi?id=118824 | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Thomas Zander
2005-12-21 23:51:36 UTC
SVN commit 491012 by zachmann:
o Don't change the order of the objects in the outline when objects are
modified. The problem was that the order of the objects was updated
when one object was selected to bring it to the front. Now only the
list for displaying the objects is changed and not the list itself.
So now the order of the objects is as intended the z-order of the
objects. With this it will be possible in future to use the sidebar
to change the z-order of the objects.
o Added documentaion to the modified methods.
CCBUG: 118822
M +27 -47 KPrCanvas.cpp
M +25 -2 KPrCanvas.h
--- trunk/koffice/kpresenter/KPrCanvas.cpp #491011:491012
@@ -98,6 +98,7 @@
, buffer( size() )
, m_gl( _view, _view->zoomHandler() )
, m_paintGuides( false )
+, m_objectDisplayAbove( 0 )
{
m_presMenu = 0;
m_currentTextObjectView=0L;
@@ -136,7 +137,6 @@
m_isMoving = false;
m_isResizing = false;
mouseSelectedObject = false;
- selectedObjectPosition = -1;
m_setPageTimer = true;
m_drawLineInDrawMode = false;
soundPlayer = 0;
@@ -623,7 +623,7 @@
if ( page->masterPage() && page->displayObjectFromMasterPage() )
drawObjectsEdit( painter, rect, page->masterPage()->objectList(), selectionMode, pageNum );
//objects on current page
- drawObjectsEdit( painter, rect, page->objectList(), selectionMode, pageNum );
+ drawObjectsEdit( painter, rect, displayObjectList(), selectionMode, pageNum );
}
@@ -3352,24 +3352,12 @@
drawBackground( &p, _pix.rect(), page, true );
- //objects in current page
- QPtrList<KPrObject> _list = page->objectList();
-
- // check if object is selected, if so put it on the right place for the output
- if( _list.count() > 1 && (int)_list.count() > selectedObjectPosition && selectedObjectPosition >= 0) {
- _list.setAutoDelete( false );
- KPrObject *kpobject = _list.last();
- if ( kpobject->isSelected() ) {
- _list.take( _list.count() - 1 );
- _list.insert( selectedObjectPosition, kpobject );
- }
- }
-
// draw objects on master slide
if ( page->masterPage() && page->displayObjectFromMasterPage() )
drawAllObjectsInPage( &p, page->masterPage()->objectList(), pgnum );
- drawAllObjectsInPage( &p, _list, pgnum );
+ //objects in current page
+ drawAllObjectsInPage( &p, page->objectList(), pgnum );
editMode = _editMode;
p.end();
@@ -5020,47 +5008,37 @@
}
}
-void KPrCanvas::raiseObject( KPrObject *_kpobject )
+void KPrCanvas::raiseObject( KPrObject *object )
{
- if( objectList().count() <= 1 )
+ if ( objectList().count() <= 1 )
return;
- if ( selectedObjectPosition == -1 ) {
- if ( m_activePage->numSelected() == 1 ) { // execute this if user selected is one object.
- QPtrList<KPrObject> _list = objectList();
- _list.setAutoDelete( false );
-
- if ( _kpobject->isSelected() ) {
- selectedObjectPosition = objectList().findRef( _kpobject );
- _list.take( selectedObjectPosition );
- _list.append( _kpobject );
- }
-
- m_activePage->setObjectList( _list );
+
+ if ( m_objectDisplayAbove == 0 )
+ {
+ if ( m_activePage->numSelected() == 1 )
+ {
+ m_objectDisplayAbove = object;
}
- //tz not needed
- else
- selectedObjectPosition = -1;
}
}
void KPrCanvas::lowerObject()
{
- if ( selectedObjectPosition != -1 )
- {
- if( objectList().count() <= 1 || (int)objectList().count() <= selectedObjectPosition )
- return;
- KPrObject *kpobject = objectList().last();
- QPtrList<KPrObject> _list = objectList();
- _list.setAutoDelete( false );
+ m_objectDisplayAbove = 0;
+}
- if ( kpobject->isSelected() ) {
- _list.take( _list.count() - 1 );
- if ( objectList().findRef( kpobject ) != -1 )
- _list.insert( selectedObjectPosition, kpobject );
- }
- m_activePage->setObjectList( _list );
- selectedObjectPosition = -1;
+const QPtrList<KPrObject> KPrCanvas::displayObjectList() const
+{
+ QPtrList<KPrObject> list = objectList();
+ list.setAutoDelete( false );
+
+ if ( m_objectDisplayAbove && m_objectDisplayAbove->isSelected() )
+ {
+ int pos = objectList().findRef( m_objectDisplayAbove );
+ list.take( pos );
+ list.append( m_objectDisplayAbove );
}
+ return list;
}
void KPrCanvas::playSound( const QString &soundFileName )
@@ -5249,6 +5227,8 @@
{
Q_ASSERT(active);
//kdDebug(33001)<<"KPrCanvas::setActivePage( KPrPage* active) :"<<active<<endl;
+ // reset the m_objectDisplayAbove so that it is not display wrong on the other page
+ m_objectDisplayAbove = 0;
m_activePage = active;
}
--- trunk/koffice/kpresenter/KPrCanvas.h #491011:491012
@@ -611,9 +611,29 @@
/// create KPrResizeCmd
void finishResizeObject( const QString &name, bool layout = true );
- void raiseObject( KPrObject *_kpobject );
+ /**
+ * @brief Display object above the other objects in editiong mode
+ *
+ * This is used to bring a single slected object to front, so it is easier
+ * to modify.
+ *
+ * @param object which should be displayed above the other objects
+ */
+ void raiseObject( KPrObject *object );
+ /**
+ * @brief Don't display an object above the others
+ */
void lowerObject();
- int selectedObjectPosition;
+ /**
+ * @brief Get the list of objects in the order they should be displayed.
+ *
+ * This takes into acount the object set in raiseObject so that it is
+ * the last one in the list returned (the one that is displayed above all
+ * the others).
+ *
+ * @return List of objects
+ */
+ const QPtrList<KPrObject> displayObjectList() const;
/**
* This is used in automatic presentation mode.
@@ -863,6 +883,9 @@
/// true if we are in guide move state, false otherwise
bool m_paintGuides;
+ /// object which is selected and should be shown above all the other objects
+ KPrObject * m_objectDisplayAbove;
+
/// Previously spoken text object.
KPrTextObject *m_prevSpokenTO;
};
If the origin Members still active on this or have an Ticket, MR or PR (as in Invent or on the Kanban), can you insert it to the Bug Report? Thank you for the bug report. Unfortunately we were not able to get to it yet. Can we ask you to please check if this is still an issue with either Plasma 5.27 (the current LTS version) or Plasma 6.3 (the latest released version). Regards, [Tizen](https://invent.kde.org/tizen) ๐๐งน โ ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME. For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging. Thank you for helping us make KDE software even better for everyone! ๐๐งน This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME. |