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
79014111
Commit
79014111
authored
2 years ago
by
Mikhail Svechnikov
Browse files
Options
Downloads
Plain Diff
[i514] Explain purpose of 'onInstrumentChangedByEditor' methods (
#514
) (Closes
#514
)
Merging branch 'i514' into 'main'. See merge request
!1449
parents
2d4cfdb5
82321b39
No related branches found
No related tags found
1 merge request
!1449
Explain purpose of 'onInstrumentChangedByEditor' methods (#514)
Pipeline
#91788
passed
2 years ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GUI/View/Instrument/InstrumentLibraryEditor.cpp
+2
-0
2 additions, 0 deletions
GUI/View/Instrument/InstrumentLibraryEditor.cpp
GUI/View/Instrument/InstrumentView.cpp
+3
-0
3 additions, 0 deletions
GUI/View/Instrument/InstrumentView.cpp
with
5 additions
and
0 deletions
GUI/View/Instrument/InstrumentLibraryEditor.cpp
+
2
−
0
View file @
79014111
...
@@ -255,6 +255,8 @@ void InstrumentLibraryEditor::onInstrumentDescriptionEdited(const QString& t)
...
@@ -255,6 +255,8 @@ void InstrumentLibraryEditor::onInstrumentDescriptionEdited(const QString& t)
void
InstrumentLibraryEditor
::
onInstrumentChangedByEditor
()
void
InstrumentLibraryEditor
::
onInstrumentChangedByEditor
()
{
{
// uses 'MultiInstrumentNotifier::instrumentChanged' signal to set
// 'InstrumentLibrary:m_modified' flag to true ==> save library on close.
auto
*
currentInstrument
=
m_treeModel
->
itemForIndex
(
m_ui
->
treeView
->
currentIndex
());
auto
*
currentInstrument
=
m_treeModel
->
itemForIndex
(
m_ui
->
treeView
->
currentIndex
());
m_instrumentLibrary
->
editController
()
->
notifyInstrumentChanged
(
currentInstrument
);
m_instrumentLibrary
->
editController
()
->
notifyInstrumentChanged
(
currentInstrument
);
}
}
...
...
This diff is collapsed.
Click to expand it.
GUI/View/Instrument/InstrumentView.cpp
+
3
−
0
View file @
79014111
...
@@ -168,6 +168,9 @@ void InstrumentView::onInstrumentdescriptionEdited(const QString& t)
...
@@ -168,6 +168,9 @@ void InstrumentView::onInstrumentdescriptionEdited(const QString& t)
void
InstrumentView
::
onInstrumentChangedByEditor
()
void
InstrumentView
::
onInstrumentChangedByEditor
()
{
{
// uses 'MultiInstrumentNotifier::instrumentChanged' signal for two purposes:
// 1) notify 'ProjectDocument' that user has changed data ==> mark project with '*'
// 2) notify 'LinkInstrumentManager' ==> unlink instrument from data if they are incompatible
m_document
->
multiNotifier
()
->
notifyInstrumentChanged
(
m_document
->
multiNotifier
()
->
notifyInstrumentChanged
(
m_instrumentListView
->
currentInstrumentItem
());
m_instrumentListView
->
currentInstrumentItem
());
}
}
...
...
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