Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
1e5d1ee5
Commit
1e5d1ee5
authored
2 years ago
by
Mikhail Svechnikov
Browse files
Options
Downloads
Patches
Plain Diff
MaskGraphicsScene: cleanup
parent
1625826f
No related branches found
No related tags found
1 merge request
!1339
GUI: fix masks and projections
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GUI/View/Mask/MaskGraphicsScene.cpp
+8
-12
8 additions, 12 deletions
GUI/View/Mask/MaskGraphicsScene.cpp
GUI/View/Mask/MaskGraphicsScene.h
+0
-1
0 additions, 1 deletion
GUI/View/Mask/MaskGraphicsScene.h
with
8 additions
and
13 deletions
GUI/View/Mask/MaskGraphicsScene.cpp
+
8
−
12
View file @
1e5d1ee5
...
...
@@ -40,7 +40,7 @@ MaskGraphicsScene::MaskGraphicsScene(QObject* parent)
{
setSceneRect
(
default_scene_rect
);
connect
(
this
,
&
MaskGraphicsScene
::
selectionChanged
,
this
,
&
MaskGraphicsScene
::
onSceneSelectionChanged
);
&
MaskGraphicsScene
::
onSceneSelectionChanged
,
Qt
::
UniqueConnection
);
}
MaskGraphicsScene
::~
MaskGraphicsScene
()
...
...
@@ -85,7 +85,7 @@ void MaskGraphicsScene::connectMaskContainer(MaskContainerModel* maskContainerMo
connect
(
maskContainerModel
,
&
QAbstractListModel
::
rowsAboutToBeRemoved
,
this
,
&
MaskGraphicsScene
::
onRowsAboutToBeRemoved
);
connect
(
maskContainerModel
,
&
QAbstractListModel
::
rowsRemoved
,
this
,
&
MaskGraphicsScene
::
onRowsRemoved
);
&
MaskGraphicsScene
::
updateScene
);
connect
(
maskContainerModel
,
&
QAbstractListModel
::
modelReset
,
this
,
&
MaskGraphicsScene
::
updateScene
);
connect
(
maskContainerModel
,
&
QAbstractListModel
::
rowsMoved
,
this
,
...
...
@@ -104,7 +104,7 @@ void MaskGraphicsScene::disconnectMaskContainer(MaskContainerModel* maskContaine
disconnect
(
maskContainerModel
,
&
QAbstractListModel
::
rowsAboutToBeRemoved
,
this
,
&
MaskGraphicsScene
::
onRowsAboutToBeRemoved
);
disconnect
(
maskContainerModel
,
&
QAbstractListModel
::
rowsRemoved
,
this
,
&
MaskGraphicsScene
::
onRowsRemoved
);
&
MaskGraphicsScene
::
updateScene
);
disconnect
(
maskContainerModel
,
&
QAbstractListModel
::
modelReset
,
this
,
&
MaskGraphicsScene
::
updateScene
);
disconnect
(
maskContainerModel
,
&
QAbstractListModel
::
rowsMoved
,
this
,
...
...
@@ -168,11 +168,6 @@ void MaskGraphicsScene::onRowsAboutToBeRemoved(const QModelIndex&, int first, in
m_block_selection
=
false
;
}
void
MaskGraphicsScene
::
onRowsRemoved
(
const
QModelIndex
&
,
int
,
int
)
{
updateScene
();
}
void
MaskGraphicsScene
::
cancelCurrentDrawing
()
{
if
(
isDrawingInProgress
())
{
...
...
@@ -732,13 +727,14 @@ void MaskGraphicsScene::processMaskAllItem(QGraphicsSceneMouseEvent* event)
void
MaskGraphicsScene
::
subscribeMaskItem
(
MaskItemObject
*
item
)
{
auto
*
maskItem
=
dynamic_cast
<
MaskItem
*>
(
item
);
if
(
!
maskItem
)
if
(
!
item
)
return
;
connect
(
maskItem
,
&
MaskItemObject
::
maskGeometryChanged
,
this
,
&
MaskGraphicsScene
::
lineItemMoved
,
connect
(
item
,
&
MaskItemObject
::
maskGeometryChanged
,
this
,
&
MaskGraphicsScene
::
lineItemMoved
,
Qt
::
UniqueConnection
);
connect
(
item
,
&
MaskItemObject
::
maskGeometryChanged
,
this
,
&
MaskGraphicsScene
::
onMaskMove
,
Qt
::
UniqueConnection
);
connect
(
maskI
tem
,
&
MaskItem
::
maskToBeDestroyed
,
this
,
&
MaskGraphicsScene
::
lineItemDeleted
,
connect
(
i
tem
,
&
MaskItem
Object
::
maskToBeDestroyed
,
this
,
&
MaskGraphicsScene
::
lineItemDeleted
,
Qt
::
UniqueConnection
);
}
...
...
This diff is collapsed.
Click to expand it.
GUI/View/Mask/MaskGraphicsScene.h
+
0
−
1
View file @
1e5d1ee5
...
...
@@ -60,7 +60,6 @@ public slots:
void
onMaskValueChanged
(
MaskEditorFlags
::
MaskValue
value
);
void
onRowsInserted
(
const
QModelIndex
&
,
int
,
int
);
void
onRowsAboutToBeRemoved
(
const
QModelIndex
&
,
int
first
,
int
last
);
void
onRowsRemoved
(
const
QModelIndex
&
,
int
,
int
);
void
cancelCurrentDrawing
();
void
resetScene
();
void
updateScene
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment