Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
8fb0036b
Commit
8fb0036b
authored
Feb 21, 2012
by
Anatoly Mihalchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Attempt to fix crash in the ticket 515.
parent
b9c2e8d6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
9 deletions
+17
-9
UBLibNavigatorWidget.cpp
src/gui/UBLibNavigatorWidget.cpp
+8
-5
UBLibPathViewer.cpp
src/gui/UBLibPathViewer.cpp
+3
-2
UBLibraryWidget.cpp
src/gui/UBLibraryWidget.cpp
+4
-1
UBLibraryWidget.h
src/gui/UBLibraryWidget.h
+2
-1
No files found.
src/gui/UBLibNavigatorWidget.cpp
View file @
8fb0036b
...
...
@@ -126,11 +126,14 @@ void UBLibNavigatorWidget::onNavigbarUpate(UBLibElement *pElem)
*/
void
UBLibNavigatorWidget
::
onPathItemClicked
(
UBChainedLibElement
*
elem
)
{
// If this element has some subelement, remove them
removeNextChainedElements
(
elem
);
// The refresh the view
mLibWidget
->
setCurrentElemsAndRefresh
(
elem
);
if
(
!
this
->
libraryWidget
()
->
isLoadingLibraryItems
())
{
// If this element has some subelement, remove them
removeNextChainedElements
(
elem
);
// The refresh the view
mLibWidget
->
setCurrentElemsAndRefresh
(
elem
);
}
}
/**
...
...
src/gui/UBLibPathViewer.cpp
View file @
8fb0036b
...
...
@@ -405,9 +405,10 @@ void UBPathScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
if
(
NULL
!=
pView
)
{
int
iClickedItem
=
pView
->
widgetAt
(
event
->
scenePos
());
if
(
-
1
!=
iClickedItem
)
QGraphicsLayout
*
wgtLayout
=
pGWidget
->
layout
();
if
(
iClickedItem
!=
-
1
&&
wgtLayout
!=
NULL
)
{
QGraphicsWidget
*
pFolderW
=
dynamic_cast
<
QGraphicsWidget
*>
(
pGWidget
->
layout
()
->
itemAt
(
iClickedItem
));
QGraphicsWidget
*
pFolderW
=
dynamic_cast
<
QGraphicsWidget
*>
(
wgtLayout
->
itemAt
(
iClickedItem
));
if
(
NULL
!=
pFolderW
)
{
UBChainedLibElement
*
chElem
=
mMapWidgetToChainedElem
[
pFolderW
];
...
...
src/gui/UBLibraryWidget.cpp
View file @
8fb0036b
...
...
@@ -43,6 +43,7 @@ UBLibraryWidget::UBLibraryWidget(QWidget *parent, const char *name):UBThumbnailW
,
mpCrntDir
(
NULL
)
,
mpCrntElem
(
NULL
)
,
mpTmpElem
(
NULL
)
,
mLoadingLibraryItems
(
false
)
{
setObjectName
(
name
);
setSpacing
(
5
);
...
...
@@ -147,7 +148,8 @@ void UBLibraryWidget::onItemClicked(QGraphicsItem *item, int index)
Q_UNUSED
(
index
);
if
(
NULL
!=
item
)
{
int
iItem
=
mGraphicItems
.
indexOf
(
item
);
mLoadingLibraryItems
=
true
;
int
iItem
=
mGraphicItems
.
indexOf
(
item
);
if
(
0
<=
iItem
)
{
UBLibElement
*
pElem
=
mCurrentElems
.
at
(
iItem
);
...
...
@@ -183,6 +185,7 @@ void UBLibraryWidget::onItemClicked(QGraphicsItem *item, int index)
}
emit
itemClicked
();
}
mLoadingLibraryItems
=
false
;
}
}
...
...
src/gui/UBLibraryWidget.h
View file @
8fb0036b
...
...
@@ -48,6 +48,7 @@ public:
void
init
();
UBLibraryController
*
libraryController
()
{
return
mLibraryController
;}
bool
isLoadingLibraryItems
()
const
{
return
mLoadingLibraryItems
;
}
public
slots
:
void
onRefreshCurrentFolder
();
...
...
@@ -92,7 +93,7 @@ private:
QList
<
UBLibElement
*>
mCurrentElems
;
QList
<
UBLibElement
*>
mOrigCurrentElems
;
QList
<
QGraphicsItem
*>
mItems
;
bool
mLoadingLibraryItems
;
};
class
UBNewFolderDlg
:
public
QDialog
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment