@ -170,14 +170,14 @@ int NoteSelection::count()
return count ;
}
TQValueList < Note * > NoteSelection : : tq parentGroups( )
TQValueList < Note * > NoteSelection : : parentGroups( )
{
TQValueList < Note * > groups ;
// For each note:
for ( NoteSelection * node = firstStacked ( ) ; node ; node = node - > nextStacked ( ) )
// For each tqparent groups of the note:
for ( Note * note = node - > note - > tq parentNote( ) ; note ; note = note - > tq parentNote( ) )
for ( Note * note = node - > note - > parentNote( ) ; note ; note = note - > parentNote( ) )
// Add it (if it was not already in the list):
if ( ! note - > isColumn ( ) & & ! groups . tqcontains ( note ) )
groups . append ( note ) ;
@ -430,7 +430,7 @@ void Basket::appendNoteAfter(Note *note, Note *after)
if ( after ) {
// The normal case:
for ( Note * n = note ; n ; n = n - > next ( ) )
n - > setParentNote ( after - > tq parentNote( ) ) ;
n - > setParentNote ( after - > parentNote( ) ) ;
note - > setPrev ( after ) ;
last - > setNext ( after - > next ( ) ) ;
after - > setNext ( note ) ;
@ -470,15 +470,15 @@ void Basket::appendNoteBefore(Note *note, Note *before)
if ( before ) {
// The normal case:
for ( Note * n = note ; n ; n = n - > next ( ) )
n - > setParentNote ( before - > tq parentNote( ) ) ;
n - > setParentNote ( before - > parentNote( ) ) ;
note - > setPrev ( before - > prev ( ) ) ;
last - > setNext ( before ) ;
before - > setPrev ( last ) ;
if ( note - > prev ( ) )
note - > prev ( ) - > setNext ( note ) ;
else {
if ( note - > tq parentNote( ) )
note - > tq parentNote( ) - > setFirstChild ( note ) ;
if ( note - > parentNote( ) )
note - > parentNote( ) - > setFirstChild ( note ) ;
else
m_firstNote = note ;
}
@ -556,19 +556,19 @@ void Basket::unplugNote(Note *note)
if ( note - > next ( ) )
note - > next ( ) - > setPrev ( note - > prev ( ) ) ;
if ( note - > tq parentNote( ) ) {
if ( note - > parentNote( ) ) {
// If it was the first note of a group, change the first note of the group:
if ( note - > tq parentNote( ) - > firstChild ( ) = = note )
note - > tq parentNote( ) - > setFirstChild ( note - > next ( ) ) ;
if ( note - > parentNote( ) - > firstChild ( ) = = note )
note - > parentNote( ) - > setFirstChild ( note - > next ( ) ) ;
if ( ! note - > tq parentNote( ) - > isColumn ( ) ) {
if ( ! note - > parentNote( ) - > isColumn ( ) ) {
// Ungroup if still 0 note inside tqparent group:
if ( ! note - > tq parentNote( ) - > firstChild ( ) )
unplugNote ( note - > tq parentNote( ) ) ; // TODO delete
if ( ! note - > parentNote( ) - > firstChild ( ) )
unplugNote ( note - > parentNote( ) ) ; // TODO delete
// Ungroup if still 1 note inside tqparent group:
else if ( ! note - > tq parentNote( ) - > firstChild ( ) - > next ( ) )
ungroupNote ( note - > tq parentNote( ) ) ;
else if ( ! note - > parentNote( ) - > firstChild ( ) - > next ( ) )
ungroupNote ( note - > parentNote( ) ) ;
}
}
@ -593,7 +593,7 @@ void Basket::ungroupNote(Note *group)
lastGroupedNote - > next ( ) - > setPrev ( note ) ;
note - > setNext ( lastGroupedNote - > next ( ) ) ;
lastGroupedNote - > setNext ( note ) ;
note - > setParentNote ( group - > tq parentNote( ) ) ;
note - > setParentNote ( group - > parentNote( ) ) ;
note - > setPrev ( lastGroupedNote ) ;
note - > setGroupWidth ( group - > groupWidth ( ) - Note : : GROUP_WIDTH ) ;
@ -605,7 +605,7 @@ void Basket::ungroupNote(Note *group)
group - > setFirstChild ( 0 ) ;
unplugNote ( group ) ; // TODO: delete
re tq layoutNotes( true ) ;
re layoutNotes( true ) ;
}
void Basket : : groupNoteBefore ( Note * note , Note * with )
@ -627,11 +627,11 @@ void Basket::groupNoteBefore(Note *note, Note *with)
group - > setNext ( with - > next ( ) ) ;
group - > setX ( with - > x ( ) ) ;
group - > setY ( with - > y ( ) ) ;
if ( with - > tq parentNote( ) & & with - > tq parentNote( ) - > firstChild ( ) = = with )
with - > tq parentNote( ) - > setFirstChild ( group ) ;
if ( with - > parentNote( ) & & with - > parentNote( ) - > firstChild ( ) = = with )
with - > parentNote( ) - > setFirstChild ( group ) ;
else if ( m_firstNote = = with )
m_firstNote = group ;
group - > setParentNote ( with - > tq parentNote( ) ) ;
group - > setParentNote ( with - > parentNote( ) ) ;
group - > setFirstChild ( note ) ;
group - > setGroupWidth ( with - > groupWidth ( ) + Note : : GROUP_WIDTH ) ;
@ -671,11 +671,11 @@ void Basket::groupNoteAfter(Note *note, Note *with)
group - > setNext ( with - > next ( ) ) ;
group - > setX ( with - > x ( ) ) ;
group - > setY ( with - > y ( ) ) ;
if ( with - > tq parentNote( ) & & with - > tq parentNote( ) - > firstChild ( ) = = with )
with - > tq parentNote( ) - > setFirstChild ( group ) ;
if ( with - > parentNote( ) & & with - > parentNote( ) - > firstChild ( ) = = with )
with - > parentNote( ) - > setFirstChild ( group ) ;
else if ( m_firstNote = = with )
m_firstNote = group ;
group - > setParentNote ( with - > tq parentNote( ) ) ;
group - > setParentNote ( with - > parentNote( ) ) ;
group - > setFirstChild ( with ) ;
group - > setGroupWidth ( with - > groupWidth ( ) + Note : : GROUP_WIDTH ) ;
@ -983,11 +983,11 @@ void Basket::setDisposition(int disposition, int columnCount)
}
if ( columnCount ! = m_columnsCount ) {
m_columnsCount = ( columnCount < = 0 ? 1 : columnCount ) ;
equalizeColumnSizes ( ) ; // Will re tq layoutNotes()
equalizeColumnSizes ( ) ; // Will re layoutNotes()
}
} else if ( currentDisposition = = COLUMNS_LAYOUT & & ( disposition = = FREE_LAYOUT | | disposition = = MINDMAPS_LAYOUT ) ) {
Note * column = firstNote ( ) ;
m_columnsCount = 0 ; // Now, so re tq layoutNotes() will not retqlayout the free notes as if they were columns!
m_columnsCount = 0 ; // Now, so re layoutNotes() will not retqlayout the free notes as if they were columns!
while ( column ) {
// Move all childs on the first level:
Note * nextColumn = column - > next ( ) ;
@ -996,7 +996,7 @@ void Basket::setDisposition(int disposition, int columnCount)
}
unselectAll ( ) ;
m_mindMap = ( disposition = = MINDMAPS_LAYOUT ) ;
re tq layoutNotes( true ) ;
re layoutNotes( true ) ;
} else if ( ( currentDisposition = = FREE_LAYOUT | | currentDisposition = = MINDMAPS_LAYOUT ) & & disposition = = COLUMNS_LAYOUT ) {
if ( firstNote ( ) ) {
// TODO: Reorder notes!
@ -1031,7 +1031,7 @@ void Basket::setDisposition(int disposition, int columnCount)
}
}
m_columnsCount = ( columnCount < = 0 ? 1 : columnCount ) ;
equalizeColumnSizes ( ) ; // Will re tq layoutNotes()
equalizeColumnSizes ( ) ; // Will re layoutNotes()
}
}
@ -1041,7 +1041,7 @@ void Basket::equalizeColumnSizes()
return ;
// Necessary to know the available space;
re tq layoutNotes( true ) ;
re layoutNotes( true ) ;
int availableSpace = visibleWidth ( ) ;
int columnWidth = ( visibleWidth ( ) - ( columnsCount ( ) - 1 ) * Note : : GROUP_WIDTH ) / columnsCount ( ) ;
@ -1067,7 +1067,7 @@ void Basket::equalizeColumnSizes()
column = column - > next ( ) ;
}
re tq layoutNotes( true ) ;
re layoutNotes( true ) ;
}
void Basket : : enableActions ( )
@ -1117,7 +1117,7 @@ void Basket::aboutToBeActivated()
FOR_EACH_NOTE ( note )
note - > finishLazyLoad ( ) ;
//re tq layoutNotes(/*animate=*/false);
//re layoutNotes(/*animate=*/false);
setFocusedNote ( 0 ) ; // So that during the focusInEvent that will come shortly, the FIRST note is focused.
if ( Settings : : playAnimations ( ) & & ! decoration ( ) - > filterBar ( ) - > filterData ( ) . isFiltering & & Global : : bnpView - > currentBasket ( ) = = this ) // No animation when filtering all!
@ -1205,7 +1205,7 @@ void Basket::load()
m_columnsCount = columnsCount ;
}
re tq layoutNotes( false ) ;
re layoutNotes( false ) ;
// On application start, the current basket is not focused yet, so the focus rectangle is not shown when calling focusANote():
if ( Global : : bnpView - > currentBasket ( ) = = this )
@ -1243,7 +1243,7 @@ void Basket::newFilter(const FilterData &data, bool andEnsureVisible/* = true*/)
for ( Note * note = firstNote ( ) ; note ; note = note - > next ( ) )
m_countFounds + = note - > newFilter ( data ) ;
re tq layoutNotes( true ) ;
re layoutNotes( true ) ;
signalCountsChanged ( ) ;
if ( hasFocus ( ) ) // if (!hasFocus()), focusANote() will be called at focusInEvent()
@ -1351,7 +1351,7 @@ Basket::Basket(TQWidget *tqparent, const TQString &folderName)
m_doNotCloseEditor ( false ) , m_editParagraph ( 0 ) , m_editIndex ( 0 ) ,
m_isDuringDrag ( false ) , m_draggedNotes ( ) ,
m_focusedNote ( 0 ) , m_startOfShiftSelectionNote ( 0 ) ,
m_finishLoadOnFirstShow ( false ) , m_re tq layoutOnNextShow( false )
m_finishLoadOnFirstShow ( false ) , m_re layoutOnNextShow( false )
{
TQString sAction = " local_basket_activate_ " + folderName ;
m_action = new KAction ( " FAKE TEXT " , " FAKE ICON " , KShortcut ( ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( activatedShortcut ( ) ) , Global : : bnpView - > actionCollection ( ) , sAction ) ;
@ -1554,7 +1554,7 @@ void Basket::contentsMousePressEvent(TQMouseEvent *event)
// Folding/Unfolding group:
if ( zone = = Note : : GroupExpander ) {
clicked - > toggleFolded ( Settings : : playAnimations ( ) ) ;
re tq layoutNotes( true ) ;
re layoutNotes( true ) ;
m_noActionOnMouseRelease = true ;
return ;
}
@ -1847,7 +1847,7 @@ void Basket::insertNote(Note *note, Note *clicked, int zone, const TQPoint &pos,
appendNoteAfter ( note , lastNote ( ) ) ;
}
re tq layoutNotes( true ) ;
re layoutNotes( true ) ;
}
void Basket : : clickedToInsert ( TQMouseEvent * event , Note * clicked , /*Note::Zone*/ int zone )
@ -1938,7 +1938,7 @@ void Basket::contentsDropEvent(TQDropEvent *event)
// Do NOT check the bottom&right borders.
// Because imagine someone drag&drop a big note from the top to the bottom of a big basket (with big vertical scrollbars),
// the note is first removed, and re tq layoutNotes() compute the new height that is smaller
// the note is first removed, and re layoutNotes() compute the new height that is smaller
// Then noteAt() is called for the mouse pointer position, because the basket is now smaller, the cursor is out of boundaries!!!
// Should, of course, not return 0:
Note * clicked = noteAt ( event - > pos ( ) . x ( ) , event - > pos ( ) . y ( ) ) ;
@ -2428,7 +2428,7 @@ void Basket::contentsMouseMoveEvent(TQMouseEvent *event)
if ( m_resizingNote ) {
int groupWidth = event - > pos ( ) . x ( ) - m_resizingNote - > x ( ) - m_pickedResizer ;
int minRight = m_resizingNote - > minRight ( ) ;
int maxRight = 100 * contentsWidth ( ) ; // A big enough value (+infinity) for free tq layouts.
int maxRight = 100 * contentsWidth ( ) ; // A big enough value (+infinity) for free layouts.
Note * nextColumn = m_resizingNote - > next ( ) ;
if ( m_resizingNote - > isColumn ( ) ) {
if ( nextColumn )
@ -2452,7 +2452,7 @@ void Basket::contentsMouseMoveEvent(TQMouseEvent *event)
column - > setGroupWidth ( column - > groupWidth ( ) - delta ) ;
}
}
re tq layoutNotes( true ) ;
re layoutNotes( true ) ;
}
// Moving a Note:
@ -2463,8 +2463,8 @@ void Basket::contentsMouseMoveEvent(TQMouseEvent *event)
if ( y < 0 ) y = 0 ;
m_movingNote - > setX ( x ) ;
m_movingNote - > setY ( y ) ;
m_movingNote - > re tq layoutAt( x , y , / * animate = * / false ) ;
re tq layoutNotes( true ) ;
m_movingNote - > re layoutAt( x , y , / * animate = * / false ) ;
re layoutNotes( true ) ;
}
*/
@ -2565,14 +2565,14 @@ void Basket::selectAll()
} else {
// First select all in the group, then in the tqparent group...
Note * child = m_focusedNote ;
Note * tqparent = ( m_focusedNote ? m_focusedNote - > tq parentNote( ) : 0 ) ;
Note * tqparent = ( m_focusedNote ? m_focusedNote - > parentNote( ) : 0 ) ;
while ( tqparent ) {
if ( ! tqparent - > allSelected ( ) ) {
tqparent - > setSelectedRecursivly ( true ) ;
return ;
}
child = tqparent ;
tqparent = tqparent - > tq parentNote( ) ;
tqparent = tqparent - > parentNote( ) ;
}
// Then, select all:
FOR_EACH_NOTE ( note )
@ -2687,7 +2687,7 @@ void Basket::doHoverEffects(const TQPoint &pos)
// Don't do hover effects when a popup menu is opened.
// Primarily because the basket area will only receive mouseEnterEvent and mouveLeaveEvent.
// It willn't be noticed of mouseMoveEvent, which would result in a ap tq parently broken application state:
// It willn't be noticed of mouseMoveEvent, which would result in a ap parently broken application state:
if ( kapp - > activePopupWidget ( ) )
underMouse = false ;
@ -2933,7 +2933,7 @@ Note* Basket::noteAt(int x, int y)
//NO:
// // Do NOT check the bottom&right borders.
// // Because imagine someone drag&drop a big note from the top to the bottom of a big basket (with big vertical scrollbars),
// // the note is first removed, and re tq layoutNotes() compute the new height that is smaller
// // the note is first removed, and re layoutNotes() compute the new height that is smaller
// // Then noteAt() is called for the mouse pointer position, because the basket is now smaller, the cursor is out of boundaries!!!
// // Should, of course, not return 0:
if ( x < 0 | | x > contentsWidth ( ) | | y < 0 | | y > contentsHeight ( ) )
@ -2957,7 +2957,7 @@ Note* Basket::noteAt(int x, int y)
note = note - > next ( ) ;
}
// If the basket is tq layouted in columns, return one of the columns to be able to add notes in them:
// If the basket is layouted in columns, return one of the columns to be able to add notes in them:
if ( isColumnsLayout ( ) ) {
Note * column = m_firstNote ;
while ( column ) {
@ -2984,7 +2984,7 @@ Basket::~Basket()
void Basket : : viewportResizeEvent ( TQResizeEvent * event )
{
re tq layoutNotes( true ) ;
re layoutNotes( true ) ;
//cornerWidget()->setShown(horizontalScrollBar()->isShown() && verticalScrollBar()->isShown());
if ( horizontalScrollBar ( ) - > isShown ( ) & & verticalScrollBar ( ) - > isShown ( ) ) {
if ( ! cornerWidget ( ) )
@ -3254,7 +3254,7 @@ void Basket::unsetNotesWidth()
}
}
void Basket : : re tq layoutNotes( bool animate )
void Basket : : re layoutNotes( bool animate )
{
if ( Global : : bnpView - > currentBasket ( ) ! = this )
return ; // Optimize load time, and basket will be relaid out when activated, anyway
@ -3273,12 +3273,12 @@ void Basket::retqlayoutNotes(bool animate)
Note * note = m_firstNote ;
while ( note ) {
if ( note - > matching ( ) ) {
note - > re tq layoutAt( 0 , h , animate ) ;
note - > re layoutAt( 0 , h , animate ) ;
if ( note - > hasResizer ( ) ) {
int minGroupWidth = note - > minRight ( ) - note - > finalX ( ) ;
if ( note - > groupWidth ( ) < minGroupWidth ) {
note - > setGroupWidth ( minGroupWidth ) ;
re tq layoutNotes( animate ) ; // Redo the thing, but this time it should not recurse
re layoutNotes( animate ) ; // Redo the thing, but this time it should not recurse
return ;
}
}
@ -3343,7 +3343,7 @@ void Basket::animateObjects()
if ( m_underMouse )
doHoverEffects ( ) ;
recomputeBlankRects ( ) ;
//re tq layoutNotes(true); // In case an animated note was to the contents view boundaries, resize the view!
//re layoutNotes(true); // In case an animated note was to the contents view boundaries, resize the view!
updateContents ( ) ;
// If the drawing of the last frame was too long, we skip the drawing of the current and do the next one:
} else {
@ -3368,7 +3368,7 @@ void Basket::popupEmblemMenu(Note *note, int emblemNumber)
m_tagPopupNote = note ;
State * state = note - > stateForEmblemNumber ( emblemNumber ) ;
State * nextState = state - > nextState ( /*cycle=*/ false ) ;
Tag * tag = state - > tq parentTag( ) ;
Tag * tag = state - > parentTag( ) ;
m_tagPopup = tag ;
TQKeySequence sequence = tag - > shortcut ( ) . operator TQKeySequence ( ) ;
@ -3863,7 +3863,7 @@ bool Basket::closeEditor()
m_rightEditorBorder = 0 ;
Note * note = m_editor - > note ( ) ;
note - > setWidth ( 0 ) ; // For re tq layoutNotes() to succeed to take care of the change
note - > setWidth ( 0 ) ; // For re layoutNotes() to succeed to take care of the change
// Delete the editor BEFORE unselecting the note because unselecting the note would trigger closeEditor() recursivly:
bool isEmpty = m_editor - > isEmpty ( ) ;
@ -4005,7 +4005,7 @@ void Basket::showEditedNoteWhileFiltering()
Note * note = m_editor - > note ( ) ;
filterAgain ( ) ;
note - > setSelected ( true ) ;
re tq layoutNotes( false ) ;
re layoutNotes( false ) ;
note - > setX ( note - > finalX ( ) ) ;
note - > setY ( note - > finalY ( ) ) ;
filterAgainDelayed ( ) ;
@ -4136,7 +4136,7 @@ void Basket::focusANonSelectedNoteBelow(bool inSameColumn)
while ( next & & next - > isSelected ( ) )
next = next - > nextShownInStack ( ) ;
if ( next ) {
if ( inSameColumn & & isColumnsLayout ( ) & & m_focusedNote - > tq parentPrimaryNote( ) = = next - > tq parentPrimaryNote( ) ) {
if ( inSameColumn & & isColumnsLayout ( ) & & m_focusedNote - > parentPrimaryNote( ) = = next - > parentPrimaryNote( ) ) {
setFocusedNote ( next ) ;
m_startOfShiftSelectionNote = next ;
}
@ -4152,7 +4152,7 @@ void Basket::focusANonSelectedNoteAbove(bool inSameColumn)
while ( prev & & prev - > isSelected ( ) )
prev = prev - > prevShownInStack ( ) ;
if ( prev ) {
if ( inSameColumn & & isColumnsLayout ( ) & & m_focusedNote - > tq parentPrimaryNote( ) = = prev - > tq parentPrimaryNote( ) ) {
if ( inSameColumn & & isColumnsLayout ( ) & & m_focusedNote - > parentPrimaryNote( ) = = prev - > parentPrimaryNote( ) ) {
setFocusedNote ( prev ) ;
m_startOfShiftSelectionNote = prev ;
}
@ -4190,7 +4190,7 @@ void Basket::noteDeleteWithoutConfirmation(bool deleteFilesToo)
note = next ;
}
re tq layoutNotes( true ) ; // FIXME: filterAgain()?
re layoutNotes( true ) ; // FIXME: filterAgain()?
save ( ) ;
}
@ -4452,7 +4452,7 @@ void Basket::noteGroup()
unselectAll ( ) ;
group - > setSelectedRecursivly ( true ) ; // Notes were unselected by unplugging
re tq layoutNotes( true ) ;
re layoutNotes( true ) ;
save ( ) ;
}
@ -4522,7 +4522,7 @@ void Basket::noteMoveOnTop()
insertSelection ( selection , fakeNote ) ;
unplugNote ( fakeNote ) ;
selectSelection ( selection ) ;
re tq layoutNotes( true ) ;
re layoutNotes( true ) ;
save ( ) ;
}
@ -4547,7 +4547,7 @@ void Basket::noteMoveOnBottom()
insertSelection ( selection , fakeNote ) ;
unplugNote ( fakeNote ) ;
selectSelection ( selection ) ;
re tq layoutNotes( true ) ;
re layoutNotes( true ) ;
save ( ) ;
}
@ -4566,7 +4566,7 @@ void Basket::moveSelectionTo(Note *here, bool below/* = true*/)
insertSelection ( selection , fakeNote ) ;
unplugNote ( fakeNote ) ;
selectSelection ( selection ) ;
re tq layoutNotes( true ) ;
re layoutNotes( true ) ;
save ( ) ;
}
@ -4603,7 +4603,7 @@ void Basket::linkLookChanged()
note - > linkLookChanged ( ) ;
note = note - > next ( ) ;
}
re tq layoutNotes( true ) ;
re layoutNotes( true ) ;
}
void Basket : : slotCopyingDone2 ( KIO : : Job * job )
@ -4795,7 +4795,7 @@ Note* Basket::noteOn(NoteOn side)
int bestDistance = contentsWidth ( ) * contentsHeight ( ) * 10 ;
Note * note = firstNoteShownInStack ( ) ;
Note * primary = m_focusedNote - > tq parentPrimaryNote( ) ;
Note * primary = m_focusedNote - > parentPrimaryNote( ) ;
while ( note ) {
switch ( side ) {
case LEFT_SIDE : distance = m_focusedNote - > distanceOnLeftRight ( note , LEFT_SIDE ) ; break ;
@ -4803,7 +4803,7 @@ Note* Basket::noteOn(NoteOn side)
case TOP_SIDE : distance = m_focusedNote - > distanceOnTopBottom ( note , TOP_SIDE ) ; break ;
case BOTTOM_SIDE : distance = m_focusedNote - > distanceOnTopBottom ( note , BOTTOM_SIDE ) ; break ;
}
if ( ( side = = TOP_SIDE | | side = = BOTTOM_SIDE | | primary ! = note - > tq parentPrimaryNote( ) ) & & note ! = m_focusedNote & & distance > 0 & & distance < bestDistance ) {
if ( ( side = = TOP_SIDE | | side = = BOTTOM_SIDE | | primary ! = note - > parentPrimaryNote( ) ) & & note ! = m_focusedNote & & distance > 0 & & distance < bestDistance ) {
bestNote = note ;
bestDistance = distance ;
}
@ -4816,12 +4816,12 @@ Note* Basket::noteOn(NoteOn side)
Note * Basket : : firstNoteInGroup ( )
{
Note * child = m_focusedNote ;
Note * tqparent = ( m_focusedNote ? m_focusedNote - > tq parentNote( ) : 0 ) ;
Note * tqparent = ( m_focusedNote ? m_focusedNote - > parentNote( ) : 0 ) ;
while ( tqparent ) {
if ( tqparent - > firstChild ( ) ! = child & & ! tqparent - > isColumn ( ) )
return tqparent - > firstRealChild ( ) ;
child = tqparent ;
tqparent = tqparent - > tq parentNote( ) ;
tqparent = tqparent - > parentNote( ) ;
}
return 0 ;
}
@ -4830,12 +4830,12 @@ Note* Basket::noteOnHome()
{
// First try to find the first note of the group containing the focused note:
Note * child = m_focusedNote ;
Note * tqparent = ( m_focusedNote ? m_focusedNote - > tq parentNote( ) : 0 ) ;
Note * tqparent = ( m_focusedNote ? m_focusedNote - > parentNote( ) : 0 ) ;
while ( tqparent ) {
if ( tqparent - > nextShownInStack ( ) ! = m_focusedNote )
return tqparent - > nextShownInStack ( ) ;
child = tqparent ;
tqparent = tqparent - > tq parentNote( ) ;
tqparent = tqparent - > parentNote( ) ;
}
// If it was not found, then focus the very first note in the basket:
@ -4857,7 +4857,7 @@ Note* Basket::noteOnHome()
Note * Basket : : noteOnEnd ( )
{
Note * child = m_focusedNote ;
Note * tqparent = ( m_focusedNote ? m_focusedNote - > tq parentNote( ) : 0 ) ;
Note * tqparent = ( m_focusedNote ? m_focusedNote - > parentNote( ) : 0 ) ;
Note * lastChild ;
while ( tqparent ) {
lastChild = tqparent - > lastRealChild ( ) ;
@ -4869,7 +4869,7 @@ Note* Basket::noteOnEnd()
return lastChild ;
}
child = tqparent ;
tqparent = tqparent - > tq parentNote( ) ;
tqparent = tqparent - > parentNote( ) ;
}
if ( isFreeLayout ( ) ) {
Note * last ;
@ -5555,7 +5555,7 @@ void Basket::delNote(Note *note, bool askForMirroredFile)
if ( note - > isSelected ( ) )
note - > setSelected ( false ) ; //removeSelectedNote();
re tq layoutNotes( ) ;
re layoutNotes( ) ;
recolorizeNotes ( ) ;
resetInsertTo ( ) ; // If we delete the first or the last, pointer to it is invalid
save ( ) ;